I'm trying to pass params in a child web included in a parent.
I'm using this in the parent:
$('#idElemet').load('myPage.html?param1='+value);
In the child web (myPage.html) to show the param value this:
alert(getURLParameter('param1'));
function getURLParameter(name) {
var match = RegExp('[?&]' + name + '=([^&]*)').exec(window.location.search);
return match && decodeURIComponent(match[1].replace(/\+/g, ' '));
}
But it doesn't work. Any idea to read the params?
Thanks.