Forum Moderators: open

Message Too Old, No Replies

Control scrolling within a frame

The usual tricks aren't working

         

Purple Martin

12:59 am on Aug 16, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi everyone,

I'm working on a site that uses frames (not my choice). There are times when I'd like to force one of the framed documents to scroll itself back to the top.

For some reason all the scrolly stuff just isn't happening. The scrollTop property is always 0 even when I've manually scrolled down, and the onScroll event won't fire even when I manually scroll. It's as if the browser thinks the document is always at the top even when it plainly isn't. BTW it's for IE5.0 only.

Does anyone have any clues about what might be going on here?

Thanks in advance.

tedster

6:37 am on Aug 16, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There are times when I'd like to force one of the framed documents to scroll itself back to the top.

If you only want to scroll to the top of the page, would a named anchor work for you rather than script - and also be simpler?

I realize this suggestion doesn't address the oddity you've described. I assume you've checked your code to ensure that you are reading/writing the scrollTop value for the particular frame you want.

I did research this for a while and I can't find another mention of this phenomenon on the web.

rewboss

8:01 am on Aug 16, 2002 (gmt 0)

10+ Year Member



Why is it necessary to automatically scroll the page anyway? I really can't stand sites that do that.