<p>I am wondering if anyone has any experience using a JQuery plugin that converts a html </p>

<pre><code>&lt;select&gt; 
  &lt;option&gt; Blah &lt;/option&gt; 
&lt;/select&gt;
</code></pre>

<p>combo box into something (probably a div) where selecting an item acts the same as clicking a link.</p>

<p>I guess you could probably use javascript to handle a selection event (my javascript knowledge is a little in disrepair at the moment) and 'switch' on the value of the combo box but this seems like more of a hack.</p>

<p>Your advice, experience and recommendations are appreciated.</p>

[{'answer_id': 49027, 'author': 'Matt Mitchell', 'author_id': 364, 'author_profile': 'https://Stackoverflow.com/users/364', 'pm_score': 0, 'selected': False, 'text': '<p>This bit of javascript in the \'select\':</p>\n\n<pre><code>onchange="if(this.options[this.selectedIndex].value!=\'\'){this.form.submit()}"\n</code></pre>\n\n<p>It\'s not ideal (because form submissions in ASP.NET MVC which I\'m using don\'t appear to use the routing engine for URLs) but it does its job.</p>\n'}, {'answer_id': 49419, 'author': 'samjudson', 'author_id': 1908, 'author_profile': 'https://Stackoverflow.com/users/1908', 'pm_score': 2, 'selected': False, 'text': '<p>I\'m not sure where you want to link to when you click the Div, but given something like this perhaps would work:</p>\n\n<pre><code>&lt;select id="mySelect"&gt;\n  &lt;option value="1"&gt;Option 1&lt;/option&gt;\n  &lt;option value="2"&gt;Option 2&lt;/options&gt;\n&lt;/select&gt;\n&lt;div id="myDiv"/&gt;\n</code></pre>\n\n<p>and the following JQuery creates a list of <code>&lt;div&gt;</code> elements, a goes to a URL based on the value of the option:</p>\n\n<pre><code>$("#mySelect option").each(function() {\n    $("&lt;div&gt;" + $(this).text() + "&lt;/div&gt;").appendTo($("#myDiv")).bind("click", $(this).val(), function(event) {\n        location.href = "goto.php?id=" + event.data;\n    });\n});\n$("#mySelect").remove();\n</code></pre>\n\n<p>Does this do what you want?</p>\n'}, {'answer_id': 49454, 'author': 'Erlend Halvorsen', 'author_id': 1920, 'author_profile': 'https://Stackoverflow.com/users/1920', 'pm_score': 4, 'selected': True, 'text': '<p>The simple solution is to use</p>\n\n<pre><code>$("#mySelect").change(function() {\n  document.location = this.value;\n});\n</code></pre>\n\n<p>This creates an onchange event on the select box that redirects you to the url stored in the value field of the selected option.</p>\n'}, {'answer_id': 431268, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 1, 'selected': False, 'text': '<p>If you\'re going to have a lot of select boxes that you want to allow to use as redirects, without having to define them independently, try something similar to: </p>\n\n<pre><code>$("[id*=\'COMMON_NAME\']").change(function() {\n    document.location = this.value;\n});\n</code></pre>\n\n<p>And have your select boxes be named accordingly:</p>\n\n<pre><code>&lt;select id="COMMON_NAME_001"&gt;...&lt;/select&gt;\n&lt;select id="COMMON_NAME_002"&gt;...&lt;/select&gt;\n</code></pre>\n\n<p>This creates a onchange event for all IDs containing "COMMON_NAME" to do a redirect of the <code>&lt;option&gt;</code> value.</p>\n'}]
['https://Stackoverflow.com/questions/48993', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/364/']