There are three ways that I know of to handle the problem of the contents of combo box B being dependent on what the user selects in combo box A:
1- If there are only a few different sets of possible options for combo box B, store each set of options as a javaScript array. Then, when the user makes a selection on combo box A, use the onChange method to call a javaScript function to swap out the options.
2- If there are a lot of different sets of possible options, or if the lists are long, Use a server-side approach: Use the onChange event from combo box A to submit the form. The Action class then reads the value from Combo box a and prepares the list of options for combo box B. It then redisplays the page with the focus on combo box B.
3- Use AJAX to make a server-side call to get the options and refresh them without refreshing the entire page. You'll have to download one of the AJAX open source projects (Such as
DWR) and study up on AJAX in order to use this option.
[ February 02, 2006: Message edited by: Merrill Higginson ]