I have two documents like this:
http://mydomain/nsobd.html
<html>
<body>
<p name="parentElem" id="parentElem">No sign of Big Dave</p>
<iframe src="http://subdomain.mydomain/nsobd2.html"></iframe>
</body>
</html>
http://subdomain.mydomain/nsobd2.html
<html>
<body>
<a href="???" id="childLink">No sign of Big Dave</a>
</body>
</html>
What I want, is when someone clicks the childLink
in the iframe, the parentElem
scrolls into view.
I have tried:
- Using
<a href="#parentElem" target="_parent">
- this loads http://subdomain.mydomain/nsobd2.html#parentElem in the parent frame. - Using
<a href="javascript:document.findElementById('parentElem').scrollIntoView()">
- this does not work due to the two documents being on different subdomains.
Any other ideas?