I am using a jump menu created by Dreamweaver as I don't really get javascript yet :-(
It does exactly what I want (ie. jumps to the selected option) but it does not allow me to select the option that is initially selected. I hope I am making sense, here is the code and I hope someone can help !
Jump Menu Script
<script language="JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
In the page i am populating the jump menu using ASP code, like this:
<select name="faqcat" name="menu1" onChange="MM_jumpMenu('parent',this,1)">
<% If Not recordset.BOF Then
recordset.MoveFirst
Do Until recordset.EOF
%>
<option value="postpage.asp?id=<%=recordset("id"%>" selected><%=recordset("name"%></option>
<% recordset.MoveNext
Loop
End If
%>
Cheers
sjf
It does exactly what I want (ie. jumps to the selected option) but it does not allow me to select the option that is initially selected. I hope I am making sense, here is the code and I hope someone can help !
Jump Menu Script
<script language="JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
In the page i am populating the jump menu using ASP code, like this:
<select name="faqcat" name="menu1" onChange="MM_jumpMenu('parent',this,1)">
<% If Not recordset.BOF Then
recordset.MoveFirst
Do Until recordset.EOF
%>
<option value="postpage.asp?id=<%=recordset("id"%>" selected><%=recordset("name"%></option>
<% recordset.MoveNext
Loop
End If
%>
Cheers
sjf