NYCPHP Meetup

NYPHP.org

[nycphp-talk] Need help with JS

joshmccormack at travelersdiary.com joshmccormack at travelersdiary.com
Fri Dec 12 13:05:49 EST 2003


On Fri, 12 Dec 2003, Nunez, Eddy wrote:

>  
> Gotta love Javascript...
> I have been trying to figure out for last 2 hours and good part of yesterday
> how to measure the amount of scrolling you've done on a browser window.
>  
> I know about the event object, it doesn't doesn't have any properties that
> indicate how many pixels you've scrolled nor does it indicate if you
> scrolled
> up or down.
>  
> I know I could just capture keypresses and figure it out but looking for a
> clean solution, capturing keypresses seems too much like a work-around.
>  
> Sorry for OT...Thanks...
> 
> -Eddy


http://codepunk.hardwar.org.uk/ajs02.htm
"This tutorial will show you how to detect how far down or across a page a viewer has scrolled."

http://www.dithered.com/javascript/window_properties/index.html
"Description

Retrieving the dimensions of a window or how far a window has been scrolled requires looking at a different property in all the major browsers. This script creates one function for each quantity to simplify the process."

Hope that helps.

Josh




More information about the talk mailing list