Click to See Complete Forum and Search --> : Control Parent Window from iFrame?


mwd
08-17-2004, 02:53 PM
Is this possible? From the iframe I want to have the main (parent) window sroll to the top using window.scroll(0,0), but I can't seem to get it to work.



The reason I want to do this is because the iframe is tall and when the new page refreshes in the iframe I cannot see the top of it .. so I want the entire page (parent) to scroll to the top.

Mr J
08-17-2004, 03:19 PM
Please try the following in your Iframe

<a href="#null" onclick="parent.scrollTo(0,0)">Top</a>