How to refresh a jsp page when I select a value from a html:select tag
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Sergiu_Miruta
Posted On:   Monday, June 27, 2005 05:46 AM

Hy to all! I have this problem. I have an search form with more fields, but these two select fields are important: City and Streets. I know how to populate the City and the other fields with the default value, I made a static method in a bean wich retrieve all the Streets in a City, from a database. I want to call that method when a City is selected and after, refresh and populate again the Streets select or the entire form.Can I do this with struts? The Ideea with the static method it's from here: http://www.javaworld.com/javaworld/jw-05-2003/jw-0523-calltag_p.html Please help! Thank you!    More>>

Hy to all!
I have this problem.


I have an search form with more fields, but these two select fields are important: City and Streets.



I know how to populate the City and the other fields with the default value, I made a static method in a bean wich retrieve all the Streets in a City, from a database.



I want to call that method when a City is selected and after, refresh and populate again the Streets select or the entire form.Can I do this with struts?



The Ideea with the static method it's from here:
http://www.javaworld.com/javaworld/jw-05-2003/jw-0523-calltag_p.html

Please help!
Thank you!

   <<Less

Re: How to refresh a jsp page when I select a value from a html:select tag

Posted By:   Ed_Hoden  
Posted On:   Monday, June 27, 2005 05:31 PM

We normally accomplish this sort of thing by submitting the form when the primary field (in this case City) is changed and then rebuilding the option list for the dependent field (Street). The tag would look something like




HTH Ed
About | Sitemap | Contact