If you want to change the values of one combo box based on the value of another combo box, then you will have to have the data present. By this I mean, you can't have a page talk to the database after the page is loaded, you will have to go to the database, get all the information, and then load the page. HTML is static, so once it reaches the client end, you can't talk to the database without going to the server.
However, there are ways around this. If the data you have is small enough, then you can use javascript to load all the data into an array or mulit-dimensional array using some type of server-side processing like
Servlets,
JSP, or ASP. Then you have sent all the data over that is necessary, so when the change the combo box, you do have the data to change the other combo box.
All depends on how much data you have, if it is small then the above is a nice solution. If you have a lot of data, then I would either go back to the database by reloading the page, or I would just give them all items and use javascript or server-side form validation to check the page after they submit the data. Sometimes there is just so much hand-holding you can do for the user.
Bill