struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fábio Silva <fabio.si...@chipidea.com>
Subject Re: Populating select box dynamically
Date Tue, 13 Aug 2002 17:46:05 GMT
Hello,

I had the same problem, but I didn't manage to solve it using only struts.

Nevertheless, I found an interesting Javascript chunk of code that 
solved my problem:

Go to:

http://www.mattkruse.com/javascript/dynamicoptionlist/

If you have problems adapting this to struts, please tell me. I can 
arrange for a code example.

Hope this helps,
Fábio


Olga Agady wrote:
> Hello,
> 
> In my html:form I have two select boxes: one with the
> list of the countries and another one with the list of
> states in a country. When the user selects a country I
> have to populate the select box with the states for
> this country. The list of states I get from the
> database. Could someone recommend me the way how I can
> do this dynamically? I can write a javascript (which
> will be called when the user selects the country) to
> populate the state select box, but how can I get the
> list of the states in this script from the database?
> Is there any possibility to dynamically get data into
> javascript from the database? Or there is another way
> to implement those two select boxes? 
> 
> Please help.
> 
> Thanks 
> Olga
> 
> __________________________________________________
> Do You Yahoo!?
> HotJobs - Search Thousands of New Jobs
> http://www.hotjobs.com
> 
> --
> To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>
> 



--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message