Open Source Tutorials - Open Source Training
Open source training & tutorials from experienced, passionate people
chrome icon firefox icon ie icon opera icon safari icon Sings in these Browsers
A- A A+

By A Web Design

Welcome, Guest
Username Password: Remember me

Dropdown Menu Selection
(1 viewing) (1) Guest
All your queries regarding HTML will be solved in this forum
  • Page:
  • 1
TOPIC:

Dropdown Menu Selection

Dropdown Menu Selection 1 year ago #602

  • yoko
Hi,
I have a menu that lets me select from multiple options, and I want that any option that I choose will lead me to another website after clicking the submit button.
How I do this?

Re: Dropdown Menu Selection 1 year ago #603

  • kuldeep
  • OFFLINE
  • Junior Boarder
  • Posts: 35
  • Karma: 0
This should do it i think...

JavaScript code:
function Selected()
{
window.location = document.getElementById('menu').value;
}
HTML Code:
<select name="dplMenu" id="menu">
<option selected>Select</option>
<option value="your_url1">1</option>
<option value="your_url2">2</option>
<option value="your_url3">3</option>
</select>

<input type="submit" value="Go To" id="button" on-Click="Selected();">
Last Edit: 1 year ago by kuldeep.
  • Page:
  • 1
Time to create page: 1.16 seconds
OSV Newsletter


Receive HTML?

NOTE: To prevent subscription to the OSV newsletter, uncheck the checkbox above.
Guest Blog for OSV
Free Ebook Download