This is not really a struts question and I don't know your object types but
the following is pretty generic.

<script>
        yourJavaScriptFunc("<%= yourJavaObject.toString() %>");
</script>

In your example you are looking for a numeric, in which case you would drop
the quotes.

Edgar

> -----Original Message-----
> From: Yaron Sela [mailto:[EMAIL PROTECTED] 
> Sent: Monday, March 03, 2003 1:01 PM
> To: 'Struts Users Mailing List'
> Subject: Java script with struts
> 
> 
> Hi all.
> 
> I store in the pageContext two ArrayList that contains 
> different parameters. for example One contains priceses for 
> sell and one contains prices for rent.
> 
> on checkbox Click I want to change the content of a combobox.
> 
> How can I do that?
> How can I get the page context to the Javascript?
> 
> Can I change dynamical the content of a combobox by struts?
> 
> Example:
> <%
>   pageContext.setAttribute("rentprices",
> com.managers.data.DataManager.getDataList("rentprices"));
>   pageContext.setAttribute("sellprices",
> com.managers.data.DataManager.getDataList("sellprices"));
> %>
> 
> <script language="JavaScript">
>   function changePricesList(type){
>   //buy
>     if(type == 1){
>       alert("buy");
> -->  document.searchForm.budget = ??????;
>     }
>   }
> </script>
> 
> <html:html>
> .
> .
> .
>                                       <html:select 
> property="budget" tabindex="20">
>                                              <html:options 
> collection="rentprices" property="value" labelProperty="label"/>
>                                      </html:select>
> 
> .
> .
> </html:html>
> 
> Thanks for your time
> 
> yaron
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to