I have a page in html (parent page) which is inside an iframe. When you navigate inside the iframe (reload the iframe page or click the link), the parent page remains at the previous position. Therefore, I used scrollTop to return to the top of the page.
Everything works fine, but jquery only does this when the iframe is fully loaded (attached image), so this is bad ...
How to scroll a (PARENT PAGE) page until the iframe page is fully loaded?
Parent page internal code:
<script language="javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script> <script type="text/javascript"> jQuery(document).ready(function() { $('iframe').load(function(){ $(window).scrollTop(0); }); });</script> <iframe frameborder="0" height="1000" id="iframe" src="http://mysite.com" width="800"></iframe>
Thanx !!!
Lork
source share