/    Sign up×
Community /Pin to ProfileBookmark

Select List With Anchor Links

I AM TRYING TO DEVELOP A SELECT LIST FORM

<FORM NAME=”menujump” METHOD=”GET”>
<SELECT NAME=”GOTOURL” OnChange=”document.menujump.submit()”>
<option value=burbank”>Burbank</option>
<option value=vanuys”>Van Nuys</option>
<option value=encino”>Encino</option>
<option value=westhills”>West Hills</option>
</SELECT>
</FORM>

and it should lik to an anchor on the same page…it is not doing it! urrr..

here is a sample of what it should link to on the same page

<h3><a name=”Burbank”></a>BURBANK</h3>

any suggestions? or how to go about this?

to post a comment
JavaScript

6 Comments(s)

Copy linkTweet thisAlerts:
@vicpal25authorJan 27.2005 — <h3><a name="burbank"></a>BURBANK</h3>

and burbank is also all small caps in my code..
Copy linkTweet thisAlerts:
@JPnycJan 27.2005 — Should link to? Still don't quite understand. What exactly is supposed to happen?
Copy linkTweet thisAlerts:
@vicpal25authorJan 27.2005 — when you select an option from the drop down list, it should navigate/link to an anchor within the same page.
Copy linkTweet thisAlerts:
@David_HarrisonJan 27.2005 — This is what you want I think:&lt;form action="#" onsubmit="return false;"&gt;
&lt;select onchange="location.href='#'+this.options[this.selectedIndex].value;"&gt;
&lt;option value="burbank"&gt;Burbank&lt;/option&gt;
&lt;option value="vanuys"&gt;Van Nuys&lt;/option&gt;
&lt;option value="encino"&gt;Encino&lt;/option&gt;
&lt;option value="westhills"&gt;West Hills&lt;/option&gt;
&lt;/select&gt;
&lt;/form&gt;

&lt;h3 id="burbank"&gt;Burbank&lt;/h3&gt;

&lt;h3 id="vannuys"&gt;Van Nuys&lt;/h3&gt;

&lt;h3 id="encino"&gt;Encino&lt;/h3&gt;

&lt;h3 id="westhills"&gt;West Hills&lt;/h3&gt;
A tip, start with [url=http://validator.w3.org/]valid[/url] markup, then go from there. It eliminates a lot of the errors to start off with.
Copy linkTweet thisAlerts:
@vicpal25authorJan 27.2005 — YUP THAT WORKS! THANKS!
Copy linkTweet thisAlerts:
@David_HarrisonJan 27.2005 — Happy to help. ?
×

Success!

Help @vicpal25 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.18,
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,
)...