//example of URL parameter property.php?action=buy
//use this function to get the parameter value:
function getURLParameter(name) {
return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,""])[1].replace(/\+/g, '%20'))||null
}
//Then use the following method to set the value:
var val = getURLParameter('buy');
$('input#buy').val(val); // assign URL param to select field