I\'ve got a dropdown menu on my form, which when something is selected I need to reload the current page, but with an appended querystring.
How would I go about doing th
This is an old question but it came up first in google search results.
The solution I went with is similar to jAndy's.
window.location.pathname
gives me the page's url without the query string.
I'm then able to build the query string with "?"+$.param({'foo':'bar','base':'ball'})
which I then append to the pathname and set to window.location.href
.
window.location.href = window.location.pathname+"?"+$.param({'foo':'bar','base':'ball'})