Framed Page ( test.html ):
....... lots of content .... <div id="activate">Inside frame</div>
The page containing the frame ( page-containing-frame.html ):
<iframe src="test.html" name="target-iframe"></iframe> <a href="test.html#activate" target="target-iframe" onclick="frames['target-iframe'].document.getElementById('activate') .scrollIntoView();return false">Click</a> ^ That the link. I've split up code over multiple lines for visibility
Description
Your current code does not work, because the missing attribute name ( target="..." cannot match identifiers, only names). In addition, #activate parsed in the context of the current page, so the link points to page-containing-frame.html .
source share