Hi, I am trying to get the value in a select box then append it the end of a URL.

I have my form as so:
HTML Code:
<form name="formorder"> 
<select name="selectorder" onChange="order()">
<option value="atoz">A-Z</option>
<option value="ztoz">Z-A</option>
<option value="dateadded">date added</option>
<option value="dateedited">date edited</option>
</select>
</form>
and i have my javascript in the head of my page:
HTML Code:
function order() {
	neworder = document.formorder.selectorder.options[document.formorder.selectorder.selectedIndex].value;
	location.href="<?php echo $referer ?>" + "?orderby=" + neworder;
}
The PHP variable $referer is the URL of the previous page.

I'm getting the error 'Object expected' and i can't figure out why. It says the error is on line 251 but i only have 230 lines in my code :-S

Any help would be greatly appreciated thanks, BIOSTALL