1. In Javascript I want to use event object to get coordinate of cursor and show a tooltip box when the cursor point to one position. Here is my code:
function Show(e)
{
var x,y;
if(document.all)
{
x=event.clientX;
y=event.clientY;
if(x>500)x=600;
if(mclick)
{
frm.imgmh.src=mcurrImage;
frm.imgmh.style.left=x;
frm.imgmh.style.top=y;
frm.imgmh.style.display='';
frm.imgmh.style.zindex=2;
}
}
else
{
x=e.clientX;
y=e.clientY;
if(x>500)x=600;
if(mclick)
{
document.frm.imgmh.src=mcurrImage;//getElementById('imgmh')
document.frm.imgmh.style.offsetLeft=x;
document.frm.imgmh.style.offsetTop=y;
document.frm.imgmh.style.display='';
document.frm.imgmh.style.zindex=2;
}
}
}
IE is OK. But in firfox, the tooltip box is showed but can't move with cursor. It's placed a fix position.
Please help me!
2. I create 1 table, in there I name an ID for a TD tag is 'PQContent' to change the content of this TD. Here's my code:
document.getElementById('PQContent').innerHTML="<FONT FACE=arial SIZE=2>"+cont+"</FONT>";
In IE is OK, but in firefox, i can't change the content.
Please help me.
Thank you very much.



Reply With Quote

Bookmarks