C
carmen
I am using the code below to open another page depending on what is
selected. This is working ok but I would like to streamline it so that I
will hot have to create a page everytime a new category code is added. How
can I pass the category code to another page as a variable after it is
selected? That way I would only need one page that can be used for all
categories.
Thanks
Carmen
<select name="ListBoxURL" size="1" language="javascript"
onchange="gotoLink(this.form);">
<option selected>Open Report by Category Code
<%
While not rs.EOF
%>
<option
value="Action_Items/<%=rs("category_code")%>_start.asp"><%=rs.fields("category_code")%>
<%
rs.MoveNext
Wend
rs.Close
%>
</select>
</p>
<script language="JavaScript">
<!--
function gotoLink(form) {
var OptionIndex=form.ListBoxURL.selectedIndex;
parent.location = form.ListBoxURL.options[OptionIndex].value;}
//-->
</script>
selected. This is working ok but I would like to streamline it so that I
will hot have to create a page everytime a new category code is added. How
can I pass the category code to another page as a variable after it is
selected? That way I would only need one page that can be used for all
categories.
Thanks
Carmen
<select name="ListBoxURL" size="1" language="javascript"
onchange="gotoLink(this.form);">
<option selected>Open Report by Category Code
<%
While not rs.EOF
%>
<option
value="Action_Items/<%=rs("category_code")%>_start.asp"><%=rs.fields("category_code")%>
<%
rs.MoveNext
Wend
rs.Close
%>
</select>
</p>
<script language="JavaScript">
<!--
function gotoLink(form) {
var OptionIndex=form.ListBoxURL.selectedIndex;
parent.location = form.ListBoxURL.options[OptionIndex].value;}
//-->
</script>