[thelist] Scroll Position (Javascript)

Peter-Paul Koch gassinaumasis at hotmail.com
Fri Nov 21 06:17:06 CST 2003

>Perhaps I was not clear in what I wanted. I copied your code verbatim, ppk,
>just to confirm, but it indeed does not do what I want.
>The above page keeps the Simulated Watermark always 5 pixels (or so) from
>the bottom of the browser. I want to know for any given object, how many
>pixels it is from the bottom of the browser.

Ah, right, you want the coordinates of the event relative to the viewport. 
The clientX/Y properties of an event give it. Compare to window dimensions 
(see http://www.quirksmode.org/viewport/compatibility.html) and you've got 
what you want.

ppk, freelance web developer
Interaction, copywriting, JavaScript, integration
Column "Keep it Simple": http://www.digital-web.com/columns/keepitsimple/

Hotmail en Messenger on the move 

More information about the thelist mailing list