Hi, I have 3 select boxes on my jsp page box1=region, box2=country based on selection in box1 and box3=what is in database based on selection in box1. My question is, is there a way to grab the selection from box1 and put it into the where clause of a sql statement??? Thanks! [ February 23, 2005: Message edited by: Bear Bibeault ]
I don't want to have to re-post the page if at all possible. I just want to be able to read what is selected in the first box and take that selection and plug it into the where clause of my sql query to the database to populate the 3rd box. Is this doable?
Surely you can populate select box without rePOSTing, but it is non trivial task.
you must do the following things but I will not describe details. Actually, I want to scare you out of such kind a solution.
1. create separate page, which create output based on parameter in box1 Query the database, get ResultSet, and dynamycally write output like following. let it be /box3pop.jsp?param=x, where x is value of select box1
If you can place box1 on one page,and after submiting you respond with the second page where box3 placed (in a wizard maner) then you don't need any extra stuff.
Joined: Jan 04, 2005
Yes, I want both on the same page. I already have an onchange event for box2, I guess I will also have to write one for box3. Thanks for your time.