title: Keep selectbox value after submit
body: <p>On a website that I'm currently making I placed a selectbox were user's can sort a list of items displayed on the page. When they choose one, the page is being submitted and the selectbox value jumps back to the first default one. Now I want the selectbox to retain value after submitted. </p>
  
  <p>Im working in XSLT, so I can't use PHP. Is there a Javascript function for this? or maybe a jQuery plugin/function? </p>
  
  <p>Thanks</p>
  
  <p>my form:</p>
  
  <pre><code>&lt;form name="sort-form" action="{$root}/resorts/" method="get"&gt;
      &lt;select name="filter" onChange="document.getElementById('sort-form').submit();"&gt;
          &lt;option value=""&gt;Sort By...&lt;/option&gt;
          &lt;option value="recommended"&gt;Recommended&lt;/option&gt;
          &lt;option value="location"&gt;Location&lt;/option&gt;
          &lt;option value="prices-from"&gt;Low budget&lt;/option&gt;
          &lt;option value="prices-till"&gt;High budget&lt;/option&gt;
      &lt;/select&gt;
  &lt;/form&gt;
  </code></pre>