how do I make a drop down box with hyperlinks

B

Bob Mitchell

Below is some of the html I have used to try and make this menu or drop down
box or whatever you call it work, Can anyone please assist cause I can not
figure it out.
Bob Mitchell
(e-mail address removed)

<select>
<option value="*">Select a Province</option>
<option value="listing_guides/guides_alberta.htm">Alberta</option>
<option value="listing_guides/guides_britishcolumbia.htm">British
Columbia</option>
<option value="listing_guides/guides_manitoba.htm">Manitoba</option>
<option value="listing_guides/guides_new_brunswick.htm">New Brunswick</option>
<option value="listing_guides/guides_novia_scotia.htm">Novia Scotia</option>
<option value="listing_guides/guides_nwt.htm">N.W.T.</option>
<option value="listing_guides/guides_ontario.htm">Ontario</option>
<option value="listing_guides/guides_quebec.htm">Quebec</option>
<option value="listing_guides/guides_saskatchawan.htm">Saskatchewan</option>
<option value="listing_guides/guides_yukon.htm">Yukon</option>
<option value="listing_guides/guides_newfoundland.htm">New Foundland</option>
</select>
 
B

Bob Lehmann

What have you tried so far?

Bob Lehmann

Bob Mitchell said:
Below is some of the html I have used to try and make this menu or drop down
box or whatever you call it work, Can anyone please assist cause I can not
figure it out.
Bob Mitchell
(e-mail address removed)

<select>
<option value="*">Select a Province</option>
<option value="listing_guides/guides_alberta.htm">Alberta</option>
<option value="listing_guides/guides_britishcolumbia.htm">British
Columbia</option>
<option value="listing_guides/guides_manitoba.htm">Manitoba</option>
<option value="listing_guides/guides_new_brunswick.htm">New
Brunswick said:
<option value="listing_guides/guides_novia_scotia.htm">Novia
Scotia said:
<option value="listing_guides/guides_nwt.htm">N.W.T.</option>
<option value="listing_guides/guides_ontario.htm">Ontario</option>
<option value="listing_guides/guides_quebec.htm">Quebec</option>
<option
 
J

Jon Spivey

Hi Bob,

<select
onchange="if(this.options.selectedIndex>0)location.href=this.options[this.options.selectedIndex].value;">
.........rest as you have it
 
T

Trevor L.

Jon said:
Hi Bob,

<select
onchange="if(this.options.selectedIndex>0)location.href=this.options[this.options.selectedIndex].value;">
........rest as you have it

--
Cheers,
Jon
Microsoft MVP

Bob Mitchell said:
Below is some of the html I have used to try and make this menu or
drop down
box or whatever you call it work, Can anyone please assist cause I
can not figure it out.
Bob Mitchell
(e-mail address removed)

<select>
<option value="*">Select a Province</option>
<option value="listing_guides/guides_alberta.htm">Alberta</option>
<option value="listing_guides/guides_britishcolumbia.htm">British
Columbia</option>
<option value="listing_guides/guides_manitoba.htm">Manitoba</option>
<option value="listing_guides/guides_new_brunswick.htm">New
Brunswick</option>
<option value="listing_guides/guides_novia_scotia.htm">Novia
Scotia</option>
<option value="listing_guides/guides_nwt.htm">N.W.T.</option>
<option value="listing_guides/guides_ontario.htm">Ontario</option>
<option value="listing_guides/guides_quebec.htm">Quebec</option>
<option
value="listing_guides/guides_saskatchawan.htm">Saskatchewan</option>
<option value="listing_guides/guides_yukon.htm">Yukon</option>
<option value="listing_guides/guides_newfoundland.htm">New
Foundland</option>
</select>

This works for me
<form action="">
<select onchange="if(options[selectedIndex].value)
window.location.href=(options[selectedIndex].value)">
<option>--Select one---</option>
<option>---------------</option>
<option value="http://address1.com/">Address 1</option>
<option>---------------</option>
<option value="http://address2.com/">Address 2</option>
<option>---------------</option>
<option value="http://address3.com/">Address 3</option>
<option>---------------</option>
</select>
</form>

Are you using the full address e.g http://aaa.com/xxx.html ?

Otherwise, it will look on your hard drive
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top