View Full Version : Jump to Parent Anchor From Within iFrame Using Target

10-29-2007, 05:33 PM
Does anyone know how to put code on an included iframe which will cause the page to jump to a specific anchor point on the parent page? When I try the following, it only jumps to the top of the iframe and not to the top of the parent. I basically want it to scroll all the way to the top of the parent page as soon as the page loads.

window.location = "#top";


10-29-2007, 05:48 PM
How about:

window.parent.location ="#top"



10-29-2007, 06:43 PM
That actually caused the iframe to break out of the parent, so that none of the parent is visible.

Mr J
10-29-2007, 11:29 PM
Give this a try


EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum