title: Need help to redirect the form on submit
body: <p>I need help. When I submit this form I want it to automatically redirect to the value option (which is url) in the select list. </p>
  
  <p>So on pressing submit for Ahmedabad selected in select list it should redirect to <a href="http://intranet.guj.nic.in/passport" rel="nofollow">http://intranet.guj.nic.in/passport</a></p>
  
  <p>Currently it is not redirecting. <strong>What is the best way to do it using inline javascript code?</strong></p>
  
  <pre><code>&lt;html&gt;&lt;body&gt;
  &lt;form  id="pass-form" &gt;
  &lt;select id="pass-dropdown" &gt;&lt;option selected="selected"&gt;Select Passport Office
  for Status page &lt;/option&gt;&lt;option value="http://intranet.guj.nic.in/passport/"&gt;Ahemadabad
  &lt;/option&gt;&lt;option value="http://passportstatus.nic.in/passmain.php?city=asr"&gt;Amritsar
  &lt;/option&gt;&lt;option value="http://rpobangalore.gov.in/npassport.asp"&gt;Bangalore
  &lt;/option&gt;&lt;option value="http://passportstatus.nic.in/passmain.php?city=bly"&gt;Bareilly
  &lt;/option&gt;&lt;/select&gt;
  &lt;input type="submit"  onsubmit="var sel = document.getElementById('pass-dropdown'); window.location = sel.options[sel.selectedIndex].value" /&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>