To dislpay pop up in a specific position

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

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.
p3rk5
Forum Commoner
Posts: 34
Joined: Thu Jan 29, 2009 10:19 pm

Re: To dislpay pop up in a specific position

Post by p3rk5 »

Please post this in the client side section, not PHP.
Post Reply