Multiple selection of dropdown menu and direct to a link -


i looking javascript or in jquery custom dropdown menu

<form name="menu"> <select onchange="location = this.options[this.selectedindex].value;">     <option value="" selected="selected">courses</option>     <option value="http://www.google.com">course1</option>    <option value="http://www.youtube.com">course2</option>    <option value="http://www.yahoo.com">course3</option>                  </select>      <select onchange="location = this.options[this.selectedindex].value;">     <option value="" selected="selected">location</option>     <option value="http://www.google.com">location1</option>    <option value="http://www.youtube.com">location2</option>    <option value="http://www.yahoo.com">location3</option>                  </select> </form>  http://jsfiddle.net/kundansingh/d4fev/2/ 

in if select of course , location should redirect paticular url, each course, different locations there , url

follow steps:

  1. just pass value(url) javascript function argument.
  2. grab value in javascript function.
  3. redirect url (might use window.location.assign(url) function)`

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -