sjklein
07-11-2006, 02:41 PM
Let me start by saying I'm not sure if this thread belongs here or in the JavaScript forum, so I apologize if I choose the wrong one.
I have a jsp page that reads data from a database and creates a dropdown list from the data. After the user chooses an item from the first dropdown, I need to query the database and get the values to populate the second dropdown.
I'm new to web development, so this is confusing me a little. I need to use Java to get the data from the database (server side). But I need to use JavaScript to change the dropdown list (client side), correct? So how do I make the server side and the client side "talk" to each other?
I was thinking about putting "form.submit" in the first dropdown's onChange and getting the data from the database that way.
Does that make sense? Is that the best way to do it?
Thanks!
I have a jsp page that reads data from a database and creates a dropdown list from the data. After the user chooses an item from the first dropdown, I need to query the database and get the values to populate the second dropdown.
I'm new to web development, so this is confusing me a little. I need to use Java to get the data from the database (server side). But I need to use JavaScript to change the dropdown list (client side), correct? So how do I make the server side and the client side "talk" to each other?
I was thinking about putting "form.submit" in the first dropdown's onChange and getting the data from the database that way.
Does that make sense? Is that the best way to do it?
Thanks!