how can i remove a querystring of an url when clicking a button? my url looks like this:
www.mysite.com/?tx_felogin_pi1[forgot]=1
this page shows a form for getting the new password, everything is inside an overlaybox. when the user suddenly remembers his userdata again, i need to provide a link in the box to go back to the signin form (also inside an overlaybox), but i can not use a fix url, because the link (and the overlaybox) should be accessable on every page. so i need a link which removes the querystring, independet of the url before.
i tried this, but it won't work:
function getPathFromUrl(url) {
return url.split("?")[0];
}
// from http://stackoverflow.com/questions/2540969/remove-querystring-from-url
$("#querystring").click(getPathFromUrl);
the error in my console is: url.split is not a function...