I have a drop down that defaults to "select" after the page refreshes.
How do I keep the selected value in the dropdown field... I've tried
EVERYTHING and nothing works! :(
<script LANGUAGE="JavaScript">
function getServer(form){
var cdoServerName = document.frmSoftware.cdoServerName.options[document.frmSoftware.cdoServerName.selectedIndex].value;
if (cdoServerName == "Columbus") {
window.location.href =
"../software/default1.asp?v=details&s=Columbus&id=<%=Request.Qu eryString("id")%>";
} else if (cdoServerName == "Gainesville") {
window.location.href =
"../software/default1.asp?v=details&s=Gainesville&id=<%=Request .QueryString("id")%>";
} else if (cdoServerName == "Raliegh") {
window.location.href =
"../software/default1.asp?v=details&s=Raliegh&id=<%=Request.Que ryString("id")%>";
} else if (cdoServerName == "Portland") {
window.location.href =
"../software/default1.asp?v=details&s=Portland&id=<%=Request.Qu eryString("id")%>";
} else if (cdoServerName == "Amarillo") {
window.location.href =
"../software/default1.asp?v=details&s=Amarillo&id=<%=Request.Qu eryString("id")%>";
} else if (cdoServerName == "Harrisburg") {
window.location.href =
"../software/default1.asp?v=details&s=Harrisburg&id=<%=Request. QueryString("id")%>";
} else if (cdoServerName == "Lynchburg") {
window.location.href =
"../software/default1.asp?v=details&s=Lynchburg&id=<%=Request.Q ueryString("id")%>";
} else if (cdoServerName == "Canton") {
window.location.href =
"../software/default1.asp?v=details&s=Canton&id=<%=Request.Quer yString("id")%>";
} else {
window.location.href =
"../software/default1.asp?v=details&s=NOSERVER&id=<%=Request.Qu eryString("id")%>";
}
}
</script>
<meta name="Microsoft Theme" content="none"></head>
<body>
<form name="frmSoftware" method="post">
..........
Please select your location:
<select size="1" name="cdoServerName"
onchange="javascript:getServer();">
<option value="SELECT">SELECT</option>
<%
Dim srv, sshare
'EXECUTING- STORED QUERY- "SLINKS_DROPDOWN"
Do While Not swss.EOF
sid = swss.fields("id").value
srv = swss.Fields("srv_name").value
sshare = swss.Fields("srv_share").value
Response.Write "<option value=""" & srv & """>" & srv & "</option>"
swss.movenext
loop
swss.close
Set swss = Nothing
%>
</select>
Thanks in advance for your help!
~Lisa~