drop down box

R

ryandaniels

I am redesigning a website for a local college. I want to put a "drop down
box" on the homepage that will contain hyperlinks to other pages. I have
seen it on other websites, but I haven't figured out how to do it yet. Any
help would greatly be appreciated.

Thanks,
Ryan
 
T

Trevor L.

ryandaniels said:
I am redesigning a website for a local college. I want to put a
"drop down box" on the homepage that will contain hyperlinks to other
pages. I have seen it on other websites, but I haven't figured out
how to do it yet. Any help would greatly be appreciated.

Thanks,
Ryan

Try this
<form action="">
<select onchange="if(options[selectedIndex].value)
window.location.href=(options[selectedIndex].value)">
<option>--Select one---</option>
<option value="http://site1.com/"> site1</option>
<option value="http://site2.com/"> site2</option>
<option value="http://site3.com/"> site3</option>
</select>
</form>
 
T

Trevor L.

Trevor said:
Try this
<form action="">
<select onchange="if(options[selectedIndex].value)
window.location.href=(options[selectedIndex].value)">
<option>--Select one---</option>
<option value="http://site1.com/"> site1</option>
<option value="http://site2.com/"> site2</option>
<option value="http://site3.com/"> site3</option>
</select>
</form>

Actaully, because you want to link to pages on the same site,
the options should read
<option value="page1.html"> Page 1</option>
<option value="page2.html"> Page 2</option>
<option value="page3.html"> Page 3</option>
 

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

Top