This code worked for me, but I also needed to add: DynAPI.document.captureMouseEvents()
Before I created the event listener.... -Scott ----- Forwarded message from Angelo Tata <[EMAIL PROTECTED]> ----- Date: Tue, 23 Jul 2002 02:26:02 +0200 From: Angelo Tata <[EMAIL PROTECTED]> Reply-To: Angelo Tata <[EMAIL PROTECTED]> Subject: Re: [Dynapi-Help] Capture Mouse Position To: dynapi <[EMAIL PROTECTED]> At 12.58 22/07/2002 -0500, Scott Vitale wrote: <snip> >Now I'm trying to retrieve the mouse position and store it in a global >variable. I tried the code listed on the dynapi.sourceforget.net site, but I >can't get it to work - always shows (0,0) as the position. I don't know about the code on the site, but the same question was posted on the list some time ago, and Robert Rainwater posted the "solution". This is the code (it works for me): var mouseEL = new EventListener() mouseEL.onmousemove = function(e) { pageX = e.getPageX(); pageY = e.getPageY(); } DynAPI.document.addEventListener(mouseEL); Just put it in your onload event, and subsequently you shall be able to access the mouse position using pageX and pageY. Angelo ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Dynapi-Help mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dynapi-help ----- End forwarded message ----- ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Dynapi-Help mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dynapi-help