To dislpay pop up in a specific position

HTML, CSS and anything else that deals with client side capabilities.

Moderator: General Moderators

Post Reply
davis
Forum Newbie
Posts: 6
Joined: Tue Feb 17, 2009 5:29 am

To dislpay pop up in a specific position

Post by davis »

Hi all,

I wanted to create a pop up on mouse over of a particular menu item( which is a td in a table) .The pop up should be displayed exactyly beneath the td ..and should be displayed there always, no matter where the mouse pointer is..

I have a JS code , but it is displaying the pop up at various positions in the td..

left_pos = pEvent.clientX;
top_pos = parseInt( pEvent.clientY) + document.body.scrollTop;

var Div_Popup=document.getElementById('strDivPopupBooks');

Div_Popup.style.position="absolute";
Div_Popup.style.left = left_pos;
Div_Popup.style.top = top_pos;

Div_Popup.style.display='inline';


Your suggestions and help is always welcome.

thanks.
Post Reply