ASPSQLVB
04-08-2008, 02:23 PM
I am trying to pass variables using the onchange event of the <SELECT> tag.
Calling a function using javascript that will then pass the variables from the select tag using the location.href is what I am trying to do.Thank you for your time.:)
function SendCampSessionId()
{
location.href=CarpCampEventNews.asp?CampSessionId=" + event.srcElement.parentElement.pk3 + "&CustomerId=" + event.srcElement.parentElement.pk2
}
<select NAME="CampSessions" SIZE="1" onchange=SendCampSessionId()>
<%
Dim k
Do Until RSCampSession.EOF
Response.Write("<option pk3='" & RSCampSession("CampSessionId") & "' & pk2='" & CustomerId & "'>") & RSCampSession("CampSession")
RSCampSession.MoveNext
Loop
%>
</select>
Calling a function using javascript that will then pass the variables from the select tag using the location.href is what I am trying to do.Thank you for your time.:)
function SendCampSessionId()
{
location.href=CarpCampEventNews.asp?CampSessionId=" + event.srcElement.parentElement.pk3 + "&CustomerId=" + event.srcElement.parentElement.pk2
}
<select NAME="CampSessions" SIZE="1" onchange=SendCampSessionId()>
<%
Dim k
Do Until RSCampSession.EOF
Response.Write("<option pk3='" & RSCampSession("CampSessionId") & "' & pk2='" & CustomerId & "'>") & RSCampSession("CampSession")
RSCampSession.MoveNext
Loop
%>
</select>