struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edgar Dollin <Ed...@BLUE-MOOSE.NET>
Subject RE: Java script with struts
Date Mon, 03 Mar 2003 20:53:56 GMT
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:yaron_sela@bezeqint.net] 
> 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: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message