At the moment, I am using this JavaScript code snippet to load a URL based on the dropdown selection...
var orderby = jQuery('#dropdown');
var str;
orderby.change(function(){
str = jQuery(this).val();
window.location.href = "http://www.example.com?variable="+str;
});
Is there a way to tweak this so that instead of navigating to http://www.example.com?variable=str, it simply appends variable=str to the current URL and then redirects to it?
EDIT
I apologize for any confusion. My aim is still to redirect, but rather than specifying a new URL, I wish to add the current URL + variable and proceed with the redirection.