Redirecting to different pages based on the selection of the user

User can select one option from a drop down list box , based on the option value the page can be redirected to different URLs .

Here we will keep URLs as option values for each selection.
Here is the demo. This will redirect to this page only after the selection but you can use different URL.
We use on change event of a list box.


<select class='form-control' name='s1' id=city_id>
  <option value=''>Select One City</option>
  <option value=''>London</option>
  <option value=' York'>New York</option>
  <option value=' Delhi'>New Delhi</option>
  <option value=''>Paris</option>

$(document).ready(function() {
$("#city_id").change(function(){ // change function of listbox
window.location = $('#city_id').val();

Post your comments , suggestion , error , requirements etc here .

Most Popular JQuery Scripts


Two dependant list boxes


Calendar with Date Selection


Data change by Slider


Show & Hide element

JQuery Video Tutorials

We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
©2000-2021 All rights reserved worldwide Privacy Policy Disclaimer