G
gary
In our site we are encountering problems with drop down boxes. We have
a dropdown box & the ONChange event of which is fetching some data from
a servlet. However when we use history back button , the data of
previous page is displayed correctly but the dropdown selected index
always lags behind by one.
For instance if the selected index of dropdown is 1 data relating to it
is diplayed on table, if second option is selected a call to servlet
returns data relating to the second selection in the table et-al.
However if we click back it correctly shows the cached data of previous
dropdown value but the item in the drop down box is still pointing to
the latest one.
Would appreciate solution sharing .
Thanks
Here's the scenario Test Code in ASP:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<%
seldata = Request.Form("bankId")
Select Case ucase(seldata)
case "BANK1"
Input1 = "BANK1 Selected"
selectedOption1 = "selected"
case "BANK2"
Input2 = "BANK2 Selected"
selectedOption2 = "selected"
case "BANK3"
Input3 = "BANK3 Selected"
selectedOption3 = "selected"
case "BANK4"
Input4 = "BANK4 Selected"
selectedOption4 = "selected"
End Select
%>
</head>
<body onload="">
<form action="test.asp" name="testform" method="post">
Test 1 : select Bank :
<select name="bankId" size="1" OnChange="testform.submit() ;">
<option id="bank1" <%=selectedOption1 %> >Bank1</option>
<option id="bank2" <%=selectedOption2 %> >Bank2</option>
<option id="bank3" <%=selectedOption3 %> >Bank3</option>
<option id="bank4" <%=selectedOption4 %> >Bank4</option>
</select>
<table>
<tr><td> Show1</td> <td ><%= Input1 %> </td></tr>
<tr><td> Show2</td> <td ><%= Input2 %></td></tr>
<tr><td> Show3</td> <td ><%= Input3 %></td></tr>
<tr><td> Show4</td> <td ><%= Input4 %></td></tr>
</table>
<br>
Test 2 : submiting to client : <input type="submit" >
</form>
</body>
</html>
Is there
any way on the client side we can make drop down boxes behave correctly
with history back button. Would appreciate if you have any solution
a dropdown box & the ONChange event of which is fetching some data from
a servlet. However when we use history back button , the data of
previous page is displayed correctly but the dropdown selected index
always lags behind by one.
For instance if the selected index of dropdown is 1 data relating to it
is diplayed on table, if second option is selected a call to servlet
returns data relating to the second selection in the table et-al.
However if we click back it correctly shows the cached data of previous
dropdown value but the item in the drop down box is still pointing to
the latest one.
Would appreciate solution sharing .
Thanks
Here's the scenario Test Code in ASP:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<%
seldata = Request.Form("bankId")
Select Case ucase(seldata)
case "BANK1"
Input1 = "BANK1 Selected"
selectedOption1 = "selected"
case "BANK2"
Input2 = "BANK2 Selected"
selectedOption2 = "selected"
case "BANK3"
Input3 = "BANK3 Selected"
selectedOption3 = "selected"
case "BANK4"
Input4 = "BANK4 Selected"
selectedOption4 = "selected"
End Select
%>
</head>
<body onload="">
<form action="test.asp" name="testform" method="post">
Test 1 : select Bank :
<select name="bankId" size="1" OnChange="testform.submit() ;">
<option id="bank1" <%=selectedOption1 %> >Bank1</option>
<option id="bank2" <%=selectedOption2 %> >Bank2</option>
<option id="bank3" <%=selectedOption3 %> >Bank3</option>
<option id="bank4" <%=selectedOption4 %> >Bank4</option>
</select>
<table>
<tr><td> Show1</td> <td ><%= Input1 %> </td></tr>
<tr><td> Show2</td> <td ><%= Input2 %></td></tr>
<tr><td> Show3</td> <td ><%= Input3 %></td></tr>
<tr><td> Show4</td> <td ><%= Input4 %></td></tr>
</table>
<br>
Test 2 : submiting to client : <input type="submit" >
</form>
</body>
</html>
Is there
any way on the client side we can make drop down boxes behave correctly
with history back button. Would appreciate if you have any solution