I have a page in html (parent page) that have inside an iframe. When you navigate inside iframe (reload iframe's page or click on link) the parent page remains in its previous position. So i used scrollTop to bring back at the top the page.
All works fine but jquery do it only when the iframe is completely loaded (image inluded..) so this is not well...
How can i scrollTop (PARENT PAGE) before the iframe's page is completely loaded?
Parent page body 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!!!