Forum Moderators: open

Message Too Old, No Replies

linking items in drop down menu

         

rh317

11:42 am on May 22, 2005 (gmt 0)

10+ Year Member



Hi.
I am trying to get the items in my drop down menu to be able to link to the page that corresponds to that item. Any help would be greatly appreciated.
Thanks in advance!
rh317

bill

1:12 pm on May 22, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Welcome to WebmasterWorld rh317!

What sort of dropdowns are these? CSS, JavaScript, Java, DHTML? Could you paste a bit of the relevant code?

rh317

1:32 pm on May 22, 2005 (gmt 0)

10+ Year Member



Hi. I am using dreamweaver/HTML.
Here is my code so far now i just don't know how to get it to go.
<select name="Select A product here">
<option selected>Select A Product</option>
<option>Critical Issues</option>
<option>Dimensions</option>
<option>Family Values</option>
<option>Holidays</option>

Thank you.

stever

1:40 pm on May 22, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You may want to look around for a script which uses javascript to convert the option values to links. Free ones are available and there is one which is particularly well-known in the DW world (since it is a commercial firm, I won't drop the URL though).

Poppy122

2:08 pm on May 22, 2005 (gmt 0)

10+ Year Member



I got this code in this very forum. :)

<form name="jump">
<select name="menu" onChange="location=document.jump.menu.options[document.jump.menu.selectedIndex].value;" value="GO">
<option value="a1.htm">A1</option>
<option value="b1.htm">B1</option>
<option value="c1.htm">C1</option>
<option value="d1.htm">D1</option>
<option value="e1.htm">E1</option>
<option value="f1.htm">F1</option>
</select>
</form>

rh317

2:22 pm on May 22, 2005 (gmt 0)

10+ Year Member



thanks everyone!
I actually tried the code that poppy wrote and it didn't work. is there another step that I am missing?

pageoneresults

4:36 pm on May 22, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Try this one...

<form method="post" action="return false;">
<div>
<select onchange="location.href=this.value;">
<option value="#"></option>
<option value="#"></option>
<option value="#"></option>
</select>
</div>
</form>

Poppy122

5:01 pm on May 22, 2005 (gmt 0)

10+ Year Member



>>>>>>>>>>>>>
thanks everyone!
I actually tried the code that poppy wrote and it didn't work. is there another step that I am missing?
>>>>>>>>>>>>

a1.htm needs to be the complete url.
A1 would be the link text.

Works great for me.

rh317

11:46 am on May 23, 2005 (gmt 0)

10+ Year Member



Thanks!
I tried Poppys code again and it worked. Now i have another question :).
Does anyone know how to program in a search?