K
Kermit Piper
Hello,
I thought this should be easy, but... all I want to do is set the value
of this state drop-down based on a session var I'm getting back from a
redirect (from the processing page):
<%
tax = session("Tax")
city = session("City")
state = session("State")
%>
<select name="state">
<option value="">--Select--</option>
<option value="AL">AL</option>
<option value="AK">AK</option>
<option value="AZ">AZ</option>
<option value="AR">AR</option>
<option value="CA">CA</option>...
</select>
I can do it with the city field easy enough like this:
City : <input type="text" name="city" value="<%=city%>" size="8"
maxlength="15">
But this same technique doesn't work for the select box, it just keeps
returning to the
"--Select--".
Also, I'm trying to clear the fields that are populated with values
from the session vars like so:
<input type="Button" name="Reset" value="Clear"
onClick="clearFields();">
function clearFields()
{
document.form1.state.value == "--Select--";
document.form1.city.value == "test";
document.form1.tax.value == "";
}
But this doesn't work. Is there something special I'm supposed to do to
be able to clear session vars out of the form? I have the following
declared at the top of the page which I thougth should work: <%
Response.Expires = 0 %>
Any help greatly appreciated.
Thanks in advance,
KP
I thought this should be easy, but... all I want to do is set the value
of this state drop-down based on a session var I'm getting back from a
redirect (from the processing page):
<%
tax = session("Tax")
city = session("City")
state = session("State")
%>
<select name="state">
<option value="">--Select--</option>
<option value="AL">AL</option>
<option value="AK">AK</option>
<option value="AZ">AZ</option>
<option value="AR">AR</option>
<option value="CA">CA</option>...
</select>
I can do it with the city field easy enough like this:
City : <input type="text" name="city" value="<%=city%>" size="8"
maxlength="15">
But this same technique doesn't work for the select box, it just keeps
returning to the
"--Select--".
Also, I'm trying to clear the fields that are populated with values
from the session vars like so:
<input type="Button" name="Reset" value="Clear"
onClick="clearFields();">
function clearFields()
{
document.form1.state.value == "--Select--";
document.form1.city.value == "test";
document.form1.tax.value == "";
}
But this doesn't work. Is there something special I'm supposed to do to
be able to clear session vars out of the form? I have the following
declared at the top of the page which I thougth should work: <%
Response.Expires = 0 %>
Any help greatly appreciated.
Thanks in advance,
KP