ChitownE
05-18-2006, 06:08 AM
Been beating my head against the wall on the one for a while now. I have a page with an iFrame. The src of the iFrame is a page with an anchor link. When the iFrame src URL jumps to the #anchor, the outer window scrolls down as well. Ugh. Here's what I'm talking about:
http://www.singley.org/test/test.html
I tried adding a self.scrollTo(0, 0) line of javascript at the bottom of the parent page, and on the onload of the iFrame, but neither worked. If I add that code to a link or button, however, I can scrollTo the top of the page onClick no problem.
So, anyone know how I can scroll the outer window back to the top when the page loads? Thanks!
http://www.singley.org/test/test.html
I tried adding a self.scrollTo(0, 0) line of javascript at the bottom of the parent page, and on the onload of the iFrame, but neither worked. If I add that code to a link or button, however, I can scrollTo the top of the page onClick no problem.
So, anyone know how I can scroll the outer window back to the top when the page loads? Thanks!