I have the following URL
http:
I am passing the value of a request parameter that has a different url with such request parameters.
http: //somesite/somepage.aspx? pageURL = http: //someothersite/someotherpage.aspx? param1 = value & source = http: // anotheronesite / anotherpage
I need the pageURL value to be in bold. But I get
http:
and I do not get the original parameter. I am using the following JavaScript function -
function getParameterByName( name )
{
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS );
var results = regex.exec( window.location.href );
if( results == null )
return "";
else
return decodeURIComponent(results[1].replace(/\+/g, " "));
}
Any ideas?
source
share