/    Sign up×
Community /Pin to ProfileBookmark

Why won’t this work??

Can anybody help me, i want to make a drop down navigation menu, what am i doing wrong?

<BODY>

<P ALIGN=”right”> Quick-Nav:

<SELECT NAME=”QuickNav” SIZE=”1″>
<OPTGROUP LABEL=”Client”>
<OPTION VALUE= <A HREF=”sitemap.html” TARGET=”MAIN”>The Main Page</OPTION>
<OPTION VALUE= <A HREF=”disclaimer.html” TARGET=”MAIN”>The Disclaimer</OPTION>
<OPTION VALUE= <A HREF=”client.html” TARGET=”MAIN”>Technician Search</OPTION>
</OPTGROUP>

<OPTGROUP LABEL=”Technician”>
<OPTION VALUE= <A HREF=”register.html” TARGET=”MAIN”>Register</OPTION>
<OPTION VALUE= <A HREF=”personnel.html” TARGET=”MAIN”>Log-In</OPTION>
</OPTGROUP>
</SELECT>

</BODY>
</HTML>

to post a comment
HTML

4 Comments(s)

Copy linkTweet thisAlerts:
@havikAug 05.2003 — Why not try a form select box instead?

<HTML>

<HEAD>

<TITLE>Drop Down Navigation menu</TITLE>

<SCRIPT LANGUAGE="JavaScript">

function dropDownMenu(form){

var URL = document.form.site.options[document.form.site.selectedIndex].value;

window.location.href = URL;

}

</SCRIPT>

</HEAD>

<BODY>

<P ALIGN="right"> Quick-Nav:

<form name="form">

<select name="site" size=1>

<option value="">Go to....

<option value="http://www.yahoo.com">Yahoo

<option value="http://www.cnn.com">CNN

<option value="forums.webdeveloper.com">Web Dev Forums

</select>

<input type=button value="Go!" onClick="javascript:dropDownMenu(this)">

</form>

</BODY>

</HTML>



Havik
Copy linkTweet thisAlerts:
@freakonaleashauthorAug 05.2003 — thankyou for your help havik, that's great! Cheers
Copy linkTweet thisAlerts:
@havikAug 05.2003 — Here's a better version already designed to meet your needs:

<HTML>

<HEAD>

<TITLE>Drop Down Navigation menu</TITLE>

<SCRIPT LANGUAGE="JavaScript">

function dropDownMenu(form)

{

var URL = document.form.site.options[document.form.site.selectedIndex].value;

if(URL != "client" && URL != "technician")
{
window.location.href = URL;
}

}

</SCRIPT>

</HEAD>

<BODY>

<P ALIGN="right"> Quick-Nav:

<form name="form">

<select name="site" size=1 onChange="javascript:dropDownMenu(this)">

<option value="client">Client

<option value="sitemap.html">The Main Page

<option value="disclaimer.html">The Disclaimer

<option value="client.html">Technician Search

<option value="technician">Technician

<option value="register.html">Register

<option value="personnel.html">Log-In

</select>

</form>

</BODY>

</HTML>


Havik
Copy linkTweet thisAlerts:
@QuasiboboAug 05.2003 — How about this one:

<form>

<select onChange="top.location = this.options[this.selectedIndex].value;">

<OPTION VALUE= "sitemap.html">The Main Page</OPTION>

<OPTION VALUE= "disclaimer.html">The Disclaimer</OPTION>

<OPTION VALUE="client.html">Technician Search</OPTION>

</select>

</form>
×

Success!

Help @freakonaleash spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...