title: change browser href in combobox option
body: <p>I try to make a list of data from a table in a database. I do this with an select option, because the user is only allowed to choose one. </p>
  
  <p>I do it on this way:</p>
  
  <pre><code>&lt;select name="test"&gt;
   &lt;option value="line1"&gt;Line1&lt;/option&gt;
   &lt;option value="line2"&gt;Line2&lt;/option&gt;
   &lt;option value="other.php" onClick="window.location.href='other.php'"&gt;
   Other
  &lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>This works in IE and Firefox, but not in Google Chrome.</p>
  
  <p>It's not an option to put the <code>onClick</code> in the <code>&lt;select&gt;</code>-tag, because they don't have a href and I need their values to get the primary key and store something in the table.</p>
  
  <p>I hope you can help me.</p>
  
  <p><strong>UPDATE:</strong> this is the solution for my case, solved by <a href="https://stackoverflow.com/users/2606013/harry">Harry</a></p>
  
  <pre><code>&lt;select name="test" onchange="this.options[this.selectedIndex].value.indexOf('.php')!=-1 &amp;&amp; 
           (window.location = this.options[this.selectedIndex].value);"&gt;
   &lt;option value="line1"&gt;Line1&lt;/option&gt;
   &lt;option value="line2"&gt;Line2&lt;/option&gt;
   &lt;option value="other.php"&gt;Other&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>