[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.
>
>http://www.merlinsworld.net/dynapi_ri_dcexamples/dc_sposit_exmpl_4.shtml
>
>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
http://www.quirksmode.org/
Column "Keep it Simple": http://www.digital-web.com/columns/keepitsimple/
------------------------------------------------------------------

_________________________________________________________________
Hotmail en Messenger on the move 
http://www.msn.nl/communicatie/smsdiensten/hotmailsmsv2/



More information about the thelist mailing list