How to Get URL in drop down box

  • Thread starter Thread starter Guest
  • Start date Start date
Here's a sample that will work:

<form>
<p align="center"><b>Select a site </b>
<select id="Choice" style="color: #0000FF" size="1" name="mySelect">
<option value="">Select one</option>
<option value="http://altavista.com">AltaVista</option>
<option value="http://www.yahoo.com">Yahoo</option>
<option value="http://www.google.com">Google</option>
</select>
<input type="button" value="Go"
onclick="window.open(Choice.options[Choice.selectedIndex].value)">
</p>
</form>


Make sure you use a go button.
If you simply use onchange or onselect, people who navigate with a keyboard will never get
past the first item in the drop down.

Also, use an image editor and convert your background image to a .jpg.

A 3.6 MB bmp is a bit much. Takes forever to download even on a good DSL line.
 
where do I post that script?

Steve Easton said:
Here's a sample that will work:

<form>
<p align="center"><b>Select a site </b>
<select id="Choice" style="color: #0000FF" size="1" name="mySelect">
<option value="">Select one</option>
<option value="http://altavista.com">AltaVista</option>
<option value="http://www.yahoo.com">Yahoo</option>
<option value="http://www.google.com">Google</option>
</select>
<input type="button" value="Go"
onclick="window.open(Choice.options[Choice.selectedIndex].value)">
</p>
</form>


Make sure you use a go button.
If you simply use onchange or onselect, people who navigate with a keyboard will never get
past the first item in the drop down.

Also, use an image editor and convert your background image to a .jpg.

A 3.6 MB bmp is a bit much. Takes forever to download even on a good DSL line.



Sight2SiteMedia said:
http://www.milestonemusicgroup.com/home.htm

i am currently working on this site and i need the items in the drop down
box to be a URL link
 
Thank you for the feedback about the background pic..i changed it

Steve Easton said:
Here's a sample that will work:

<form>
<p align="center"><b>Select a site </b>
<select id="Choice" style="color: #0000FF" size="1" name="mySelect">
<option value="">Select one</option>
<option value="http://altavista.com">AltaVista</option>
<option value="http://www.yahoo.com">Yahoo</option>
<option value="http://www.google.com">Google</option>
</select>
<input type="button" value="Go"
onclick="window.open(Choice.options[Choice.selectedIndex].value)">
</p>
</form>


Make sure you use a go button.
If you simply use onchange or onselect, people who navigate with a keyboard will never get
past the first item in the drop down.

Also, use an image editor and convert your background image to a .jpg.

A 3.6 MB bmp is a bit much. Takes forever to download even on a good DSL line.



Sight2SiteMedia said:
http://www.milestonemusicgroup.com/home.htm

i am currently working on this site and i need the items in the drop down
box to be a URL link
 
The same place you had the script that didn't work.

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer




Sight2SiteMedia said:
where do I post that script?

Steve Easton said:
Here's a sample that will work:

<form>
<p align="center"><b>Select a site </b>
<select id="Choice" style="color: #0000FF" size="1" name="mySelect">
<option value="">Select one</option>
<option value="http://altavista.com">AltaVista</option>
<option value="http://www.yahoo.com">Yahoo</option>
<option value="http://www.google.com">Google</option>
</select>
<input type="button" value="Go"
onclick="window.open(Choice.options[Choice.selectedIndex].value)">
</p>
</form>


Make sure you use a go button.
If you simply use onchange or onselect, people who navigate with a keyboard will never
get
past the first item in the drop down.

Also, use an image editor and convert your background image to a .jpg.

A 3.6 MB bmp is a bit much. Takes forever to download even on a good DSL line.



Sight2SiteMedia said:
http://www.milestonemusicgroup.com/home.htm

i am currently working on this site and i need the items in the drop down
box to be a URL link
 
Thank You

Steve Easton said:
Here's a sample that will work:

<form>
<p align="center"><b>Select a site </b>
<select id="Choice" style="color: #0000FF" size="1" name="mySelect">
<option value="">Select one</option>
<option value="http://altavista.com">AltaVista</option>
<option value="http://www.yahoo.com">Yahoo</option>
<option value="http://www.google.com">Google</option>
</select>
<input type="button" value="Go"
onclick="window.open(Choice.options[Choice.selectedIndex].value)">
</p>
</form>


Make sure you use a go button.
If you simply use onchange or onselect, people who navigate with a keyboard will never get
past the first item in the drop down.

Also, use an image editor and convert your background image to a .jpg.

A 3.6 MB bmp is a bit much. Takes forever to download even on a good DSL line.



Sight2SiteMedia said:
http://www.milestonemusicgroup.com/home.htm

i am currently working on this site and i need the items in the drop down
box to be a URL link
 
sorry, last question....can i make it so when the new page opens it will open
in an inline frame? where in the script will i put this?

Sight2SiteMedia said:
Thank You

Steve Easton said:
Here's a sample that will work:

<form>
<p align="center"><b>Select a site </b>
<select id="Choice" style="color: #0000FF" size="1" name="mySelect">
<option value="">Select one</option>
<option value="http://altavista.com">AltaVista</option>
<option value="http://www.yahoo.com">Yahoo</option>
<option value="http://www.google.com">Google</option>
</select>
<input type="button" value="Go"
onclick="window.open(Choice.options[Choice.selectedIndex].value)">
</p>
</form>


Make sure you use a go button.
If you simply use onchange or onselect, people who navigate with a keyboard will never get
past the first item in the drop down.

Also, use an image editor and convert your background image to a .jpg.

A 3.6 MB bmp is a bit much. Takes forever to download even on a good DSL line.



Sight2SiteMedia said:
http://www.milestonemusicgroup.com/home.htm

i am currently working on this site and i need the items in the drop down
box to be a URL link
 
Back
Top