I have an html page with several links to another, I want to change image references on the landing page depending on the a href the user clicks. An important note is that the link is from inside an iframe and calls an iframe src to be loaded in the landing page.
//html page B
// inside an iframe
<a target="_parent" href="../gfx.html?content/more.html">this page</a>
//html page A
// buttons outside iframe
<img id="btn1" src="btn1.png" />
<img id="btn2" src="btn2.png" />
// then an iframe below
http://plnkr.co/edit/Mr40BpnbF8aYkhMtq5qf Updated the Plinkr code to show the new code thanks to icke's link.
var cdirec = getParameterByName('check');
if (cdirec) {
document.getElementById("bt1").src = "img/bt1.png";
document.getElementById("bt4").src = "img/bt4-2.png";
}
Doesn't function correctly as a boolean trigger - anyone know why?