Hi there...

I have a search results page on my small website.
I want customers to be able to alternate between search views: relevancy, price up or down and latest products in the search results.

The search results are coming from a PHP class on page load and the PHP script checks what the customers preferred search order is by the cookie. The cookie is also initially set as "relevancy", so far so good...

Here is the form that I have:
Code:
<form name="OrVw" onChange="jsFnc_OrderView()">
<span>order by:
	<select name="view">
		<option value="relevance">relevancy</option>
		<option value="pUp">price lowest</option>
		<option value="pDown">price higest</option>
		<option value="latest">newest</option>
	</select>
</span>
</form>
OnSubmit I want the cookie to change and although I haven't been so far, reload the page...
Code:
<script  type="text/javascript">
	function jsFnc_OrderView() {
		var orderView = document.OrVw.view;
		var d = new Date();
		d.setDate(d.getDate() + 14);
		setCookie(srchOrder, orderView, d);
		window.location.reload();
	}
</script>
So as the view changes the script should be executed... I'm stuck however, as nothing happens.