To dislpay pop up in a specific position
Posted: Fri Feb 20, 2009 1:09 am
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.
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.