Hi.
I stored in the pageContext two ArrayList that contains different parameters. for
example One contains priceses for sell apartment and one contains prices for rent
apartment.
Example:
<%
pageContext.setAttribute("rentprices", com.managers.data.getArrayList("rentprices"));
pageContext.setAttribute("sellprices", com.managers.data.getArrayList("sellprices"));
%>
I have a select options (combobox) that contains collection (ArrayList) define by the
property: budget.
Example:
<html:html>
.
<html:select property="budget" tabindex="20">
<html:options collection="rentprices" property="value"
labelProperty="label"/>
</html:select>
.
</html:html>
By click on a CheckBox I invoke javascript changePricesList(type) sending sell or buy.
Example:
<script language="JavaScript">
function changePricesList(type){
//buy
if(type == 1){
alert("buy");
--> document.searchForm.budget = ??????;
}
}
</script>
How can I change the values of the combobox? when I did it without struts I made a
loop and set on each option index his value, but now (in struts) I have the values in
the arrayList. Can I get the page context to the Javascript ?
Maybe I don't need the Javascript at all?
Thanks for your time
yaron