reload an iFrame with the scrollbar set to a specific coordinate.

Posted by Luis Armando on Stack Overflow See other posts from Stack Overflow or by Luis Armando
Published on 2010-03-18T16:43:41Z Indexed on 2010/03/18 19:11 UTC
Read the original article Hit count: 353

Filed under:
|
|

I was wondering how could I reload any website using javascript and set it in a way that when it reloads the scrollbar is looking scrolled down to a certain position. I'm unsure as to how to look for this in Google honestly so I haven't digged up much =/.

I think it has to be somewhere in the instruction to reload it and so far I have:

document.getElementById('life').contentWindow.scroll(0,0); //doesn't work
        document.getElementById('life').contentWindow.location.reload();

although the first one gets me:

Permission denied to get property Window.scroll of http://www.google.com.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about iframe