Webpage sort by price dropdown menu not working
<p>When I click on the filter dropdown menu and select i.e. 'Price High - Low' I want it to display products in order of price, however when I select any option nothing happens, the page remains the same. If I type in the link manually i.e. <code>main.php?sort=name</code> then that works.</p>

<p>HTML:</p>

<pre><code>&lt;select name="menu" id="drop"&gt;
    &lt;option&gt;-- Select a filter --&lt;/option&gt;
    &lt;option value="main.php?sort=name"&gt;Name A - Z&lt;/option&gt;
    &lt;option value="main.php?sort=pasc"&gt;Price Low-High&lt;/option&gt;
    &lt;option value="main.php?sort=pdesc"&gt;Price High-Low&lt;/option&gt;    
&lt;/select&gt;
</code></pre>

<p>JS:</p>

<pre><code>var sortmenu = document.getElementById( 'menu' );
sortmenu.onchange = function() {
    window.open( this.options[ this.selectedIndex ].value, "_self" );
};
</code></pre>