myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Potter" <potterd...@gmail.com>
Subject [Trinidad] onmouseover sends null event object
Date Tue, 26 Feb 2008 18:35:52 GMT
Hi all,
I would like a popup to appear at the mouse position upon dragging the mouse
over an image tag.  I've tried several ways of doing this, but can't quite
get it.  I have tried Trinidad and Tomahawk popup components.  Because of
the large amount of popups i'll have, I need to have one dynamic popup that
I can manipulate and move around.  If I'm not mistaken the popup components
from Trinidad and Tomahawk can only be bound to one page element, so that
won't work for me.

So I've made my own javascript function to create the popup.  This almost
works, but the only way I know how to get the mouse position is to get the
clientX and clientY from the event passed into the javascript function.
Trinidad is sending a null event. The popup appears in the upper left hand
corner and I can't get any mouse position info.

I solved this by adding a onLoad function through dojo that attaches the
mouseover event to all the elements that need it.  If I attach the mouseover
listener at this point, the event object passed in is not null and I can get
the mouse coordinates.  This solution fails though when I use PPR to
re-render any of the elements I altered with the onLoad function.  They lose
their onmouseover event and I can't re-attach it.

I am running out of ideas!  Can anyone help?
-Dan

Mime
View raw message