Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] Scrolling Frames
- From: javascript@xxxxxxxxxx (Peter-Paul Koch)
- Subject: [Javascript] Scrolling Frames
- Date: Wed, 25 Jul 2001 19:39:21 +0000
>Hello all,
> I'm betting the answer to my question is no, but I thought I'd ask
>anyway.
>
>Is there a way to "synchronize" scrolling for multiple frames?
Yes, that should be possible, though it won't be easy to write. Basically
you need to track where the user is in one frame. This is done by
function keepTrack()
{
if (window.innerHeight)
{
pos = window.pageYOffset
}
else if (document.body)
{
pos = document.body.scrollTop
}
setTimeout('keepTrack()',100)
}
Now pos contains the coordinate of the 'scrolling position' in one frame.
Then you'll need to tweak the value of pos and use scrollTo() to scroll the
second frame.
I don't think this is easy, but it can be done.
ppk
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
- Prev by Date: [Javascript] Scrolling Frames
- Next by Date: [Javascript] Netscape 6 problems
- Previous by thread: [Javascript] Netscape 6 problems
- Next by thread: [Javascript] (no subject)
- Index(es):