Forum Moderators: coopster

Message Too Old, No Replies

Drop Down List

Going to a Certain URL when selected

         

joe1182

10:10 pm on Aug 24, 2005 (gmt 0)

10+ Year Member



O.k. what I would like to do is create a drop down list that has say 15 options. Each option will take you to a different URL when selected. Does anyone know of a good script that would do this? Any help would be appreciated.

henry0

10:47 pm on Aug 24, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I do not know if it is a good one :)

Look here
[webmasterworld.com]
but it will give you some directions
scrol the thread down till "My dropbox contrib"

change the DB values with your URLs

however there are many ways to achieve it.

other members will come with other systems

joe1182

11:26 pm on Aug 24, 2005 (gmt 0)

10+ Year Member



Thanks for the response Henry0! However I think that may be a little more complicated than what I need to do. I will try to explain better.

Option Box
Value#1
Value#2
Value#3

These values will already be manually typed in by me. I want when Value#1 is selected that "http://www.example.com" is opened up but, when Value#2 is selected "http://www.example1.com" is opened. Does this make sense?

tata668

11:56 pm on Aug 24, 2005 (gmt 0)

10+ Year Member



<select onChange="self.location= this.options[this.selectedIndex].value">
<option value="http://www.google.com">google</option>
<option value="http://www.webmasterworld.com">webmasterworld</option>
</select>

joe1182

12:08 am on Aug 25, 2005 (gmt 0)

10+ Year Member



tata668,
Thank you so much that is what I was looking for. The page I am placing this box in is a framed page. This will reside in the top frame but, I would like the page to open up in the bottom frame. Any tips?

tata668

12:23 am on Aug 25, 2005 (gmt 0)

10+ Year Member



You have to give a name to your frames and replace "self" by the name of the frame you want to target in the script..

[htmlcodetutorial.com...]

joe1182

12:25 am on Aug 25, 2005 (gmt 0)

10+ Year Member



Great Thanks! Thank you so much for all your help.

joe1182

12:33 am on Aug 25, 2005 (gmt 0)

10+ Year Member



o.k I tried this

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

The Frame I want this to open in is named "main" but, when I try the code above nothing happens. What am I doing wrong?

tata668

12:41 am on Aug 25, 2005 (gmt 0)

10+ Year Member



try:

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

joe1182

12:51 am on Aug 25, 2005 (gmt 0)

10+ Year Member



That worked! Thanks!

tata668

1:18 am on Aug 25, 2005 (gmt 0)

10+ Year Member



no problem!