I have a select dropdown with id\'s mapped to values. On the onChange event I want to redirect to the same url but with \'id=value\' appended to the querystring.
How do
This works like a charm:
jQuery.redirect = function( url ) { window.location.replace( url ); }; $( "#selector" ).change( function() { var href = window.location.href.substring( 0, window.location.href.indexOf( '?' ) ); $.redirect( href + '?id=' + $( this ).val() ); } );