I have two select box on a web page.On selecting value from first select box i have to populate 2nd select.The values for 2nd select box comes from database.I am not able to understand how i will do it using struts1.if anyone has any link please post here.
You mean value for the first select box comes from the database. To populate your second select box from the first, you may have to use java script or some rich component like richfaces. [ August 15, 2008: Message edited by: arulk pillai ]
I have a hardcoded values in first select box.The user will choose some value from first select box and based on values from first select box i have to populate the 2nd selectbox for user.The values for 2nd selectbox comes from database.Both selectbox's are on same web page.
Originally posted by arulk pillai: or some rich component like richfaces.
Talk about using atomic bombs to crack walnuts!
This is one of the most common Ajax examples you could think of. It has been discussed many times in the HTML forum and there are examples all over the web. Search for "dependent" or "cascading" dropdowns.
Originally posted by Gowher Naik: Can we solve above problem without using AJAX?
If you dont want to use ajax then second selct box can be filled by reloading your jsp page again with new values. i.e Initially 1 select box with values and 2nd empty on select of option in 1st select box submit your jsp page and reload same page with values in 2nd select box.
But why you dont want to use AJAX any specific reasons.
roses are red, violets are blue. Some poems rhyme and some are a tiny ad:
Devious Experiments for a Truly Passive Greenhouse!