views:

23

answers:

0

From within an iframe, is there any reason window.scrollTo(0,0) wouldn't work? In other words, the client code for the iframe itself wants to scroll to the top of the iframe's client area whenever it is loaded. I thought the logic was window.scrollTo(0,0) but it's not working. Any ideas?

(To be perfectly clear: if the situation is

and the contents of test.htm contains javascript like:

is there any reason the iframe contents themselves WILL NOT be scrolled to the top and left within their client area as a result of the scrollTo()?