views:

143

answers:

1

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.

A: 

If the website in the iframe is from a different domain than the current page, you won't be allowed to affect it at all with Javascript. This is an intentional property of Javascript to prevent XSS.

Pickle
thanks for the info :)
Luis Armando