For the 3rd scenario, you would include in your HTML, something like:
Code:
<iframe id='ACTION_FRAME' width='0%'></iframe>
...then, your first select list might have something like:
Code:
<select name='select1' id='select1' onchange='update2(this.value);'>
...
</select>
Then, you would include this function in your SCRIPT section of your page:
Code:
function update2(val)
{
var list2 = document.getElementById("select2");
list2.options.length = 0; //clears list
ACTION_FRAME.document.location = 'update2.jsp?val='+val;
}
Then, assuming you are already familiar with JSP's, write one called update2.jsp which gets the values of the second list based on the sent-parameter
val. Then, include something like the following in that JSP:
Code:
<script>
var pOptList = parent.document.forms[0].select2.options;
<%
while(list2Values.next())
{
%>
pOptList[pOptList.length] = new Option('<%=list2Values.get("OPTION_TEXT")%>', '<%=list2Values.get("OPTION_VALUE")%>');
<%
}
%>
</script>
This should then, from inside the IFRAME, populate the select list in your form.
Did you follow that? To me it's a little easier to explain than designing a way to do Method 2 that I described, above.
Do you think this will work for you?
--Dave