Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Jump Menu usage - help !!!!

Status
Not open for further replies.

sjf

Technical User
Jan 1, 2001
56
AU
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=&quot;JavaScript&quot;>
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+&quot;.location='&quot;+selObj.options[selObj.selectedIndex].value+&quot;'&quot;);
if (restore) selObj.selectedIndex=0;
}
//-->
</script>

In the page i am populating the jump menu using ASP code, like this:

<select name=&quot;faqcat&quot; name=&quot;menu1&quot; onChange=&quot;MM_jumpMenu('parent',this,1)&quot;>
<% If Not recordset.BOF Then
recordset.MoveFirst
Do Until recordset.EOF
%>
<option value=&quot;postpage.asp?id=<%=recordset(&quot;id&quot;)%>&quot; selected><%=recordset(&quot;name&quot;)%></option>
<% recordset.MoveNext
Loop
End If
%>

Cheers
sjf





 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top