Changing Dropdown based on Other Dropdown Menu

Posted by Shaded on Stack Overflow See other posts from Stack Overflow or by Shaded
Published on 2010-05-03T13:43:41Z Indexed on 2010/05/03 13:48 UTC
Read the original article Hit count: 220

Filed under:
|
|
|

I've seen a few questions like this, but mine is a bit more specific so I hope this isn't considered a repost.

I am working on a website that is built with struts 2 and hibernate. I need to dynamically populate a drop down menu using data from a sql query based on an option selected in another drop down menu.

So basically when the first option is selected I need to rehit the server and get the results from a query like

SELECT column FROM table WHERE option = dropDownOption

On top of that, I would really like to use ajax to only refresh the affected elements, however I'm really unfamiliar with ajax. I have jquery on this project and I found they have some ajax built in, but is this a good method for using it? any advice on this topic would be appreciated.

© Stack Overflow or respective owner

Related posts about AJAX

Related posts about struts2