JQuery Autosubmit Dropdown
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/12655229/jquery-javascript-how-to-parse-html-using-a-get">JQuery/Javascript how to Parse HTML using a Get</a>  </p>
</blockquote>



<p>I have the following code that is working:</p>

<pre><code>$.getJSON('json/shares.json', function(data) {
var items = [];

$.each(data.Shares, function(key, val) {
items.push('&lt;option id="' + val.shareName+ '"&gt;' + val.shareName+ '&lt;/option&gt;');
});

  $('&lt;select/&gt;', {
    'id': 'shares_select',
    html: items.join('')
  }).appendTo('#shares');
});

$.get('lon_shares.html', function(data){     
$(data).appendTo('#shares');  
});
</code></pre>

<p>This will create a dropdown list using a JSON file.  I need it to autosubmit when a selection is made and then get the relevant html file, so if they choose "lon" from the dropdown the file is "lon_shares.html" and if they choose "par" it's "par_shares.html" and so on.</p>

<p>I am new to JQuery and Javascript so please give examples of how it needs to look including my code thanks.</p>
