GirlFriday1
Programmer
Hello there!
I have a drop down box with that is populated using a database. This is the code:
<SELECT NAME="User">
<option value="<%=Request.Servervariables("SCRIPT_NAME"
%>" selected>-- Select --</option>
<% While not RS2.EOF %>
<option value="<%=RS2.Fields("id"
%>"
<%
if Userid = RS2.Fields("id"
then
Response.Write "SELECTED"
UserInfo = RS2.Fields("Last Name"
& ", " & RS2.Fields("First Name"
& " "
UserInfo2 = RS2.Fields("Department Name"
& " "
UserInfo3 = RS2.Fields("Phone Number"
& " "
UserInfo4 = RS2.Fields("Email Address"
& " "
end if
%>
><
%=RS2.Fields("Last Name"
%> , <%=RS2.Fields("First Name"
%></option>
<% RS2.MoveNext
Wend %>
</SELECT>
As you can see, it is in both JScript and ASP. The problem is I don't want the user to get an error message if they select the Select option. This isn't really an option.. I thought that something like
<select name="URL" size="1" onchange="if(options[selectedIndex].value) window.location.href= (options[selectedIndex].value)">
would work, but alas, no dice.
Any suggestions?
Thanks,
Shelli
I have a drop down box with that is populated using a database. This is the code:
<SELECT NAME="User">
<option value="<%=Request.Servervariables("SCRIPT_NAME"
<% While not RS2.EOF %>
<option value="<%=RS2.Fields("id"
<%
if Userid = RS2.Fields("id"
Response.Write "SELECTED"
UserInfo = RS2.Fields("Last Name"
UserInfo2 = RS2.Fields("Department Name"
UserInfo3 = RS2.Fields("Phone Number"
UserInfo4 = RS2.Fields("Email Address"
end if
%>
><
%=RS2.Fields("Last Name"
<% RS2.MoveNext
Wend %>
</SELECT>
As you can see, it is in both JScript and ASP. The problem is I don't want the user to get an error message if they select the Select option. This isn't really an option.. I thought that something like
<select name="URL" size="1" onchange="if(options[selectedIndex].value) window.location.href= (options[selectedIndex].value)">
would work, but alas, no dice.
Any suggestions?
Thanks,
Shelli