I am passing the value of username into the query string but i am unable to get the value of the name in jquery.
this is my url
https://dev.hudpowerbid.com/front-end-pm/?fepaction=newmessageShami%20Kothari
I want to get only Shami Kothari
this is how i am attaching the name with the query string
var name= jQuery(this).parent().siblings(".htb200").html();
window.location.href ='https://example.com/front-end-pm/?fepaction=newmessage'+name;
this is how i am attaching name with url now i want to get this in jquery
this is how I am getting the value.
function getUrlVars() {
var url = 'https://example.com/front-end-pm/?fepaction=newmessage'+name;
var vars = {};
var hashes = url.split("?")[1];
var hash = hashes.split('&');
for (var i = 0; i < hash.length; i++) {
params=hash[i].split("=");
vars[params[0]] = params[1];
}
return vars;
}