Forum Moderators: open
parent.document.getElementById('MyID').scrollIntoView(true); <head> function movetoanchor(){ function graburl(name) { name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); var regexS = "[\\?&]"+name+"=([^&#]*)"; var regex = new RegExp(regexS); var results = regex.exec(parent.location.href); if(results == null) { return ""; } else { return results[1]; } } var anchorid = graburl('p'); parent.focus(); parent.document.getElementById(anchorid).scrollIntoView(true); } graburl('p') bit is grabbing the value of the query string 'p' in the parent's url, which just so happens to be the same value as the anchor that i'm trying to scroll to. <a id="blah"> <body onload="movetoanchor()"> in the iframe