ok, let me see if I can explain my situation.....
I have set up a page with two frames, code below:
<FRAMESET FRAMEBORDER=1 FRAMESPACING=0 cols=298,* framecolor="#000000">
<FRAME SCROLLING="NO" name=MENU src="Menuconnection.htm">
<FRAME SCROLLING="NO" name=MAIN src="Main.htm">
</FRAMESET>
What I want to do is to detect if the mouse has not been moved,clicked or even if the keyboard has not been moved or clicked within a certain time limit. If both of these is true I want to reset the page. I have been able to write the code to detect this for the first frame. Code below:
function CountDown()
{
iTimeLeft -= 1;
if (iTimeLeft == 0)
{
iTimeLeft = 5
if (lastChangeObj != "")
{
lastChangeObj.style.color = "Gray"
lastChangeObj = ""
}
document.frmMain.submit()
}
setTimeout("CountDown()",1000)
}
setTimeout("CountDown()",1000)
then on the body tag I put this code:
<body onmousemove="ResetTimer()" onmousedown="ResetTimer()" onkeydown="ResetTimer()" onkeyup="ResetTimer()">
This works great if the mouse stays on the left frame, but if you put the mouse on the right frame then the code still runs within the right frame,
So I quess what I am looking for is away to determine if the mouse has been moved at all on the entire page, not within the Frames.
I have set up a page with two frames, code below:
<FRAMESET FRAMEBORDER=1 FRAMESPACING=0 cols=298,* framecolor="#000000">
<FRAME SCROLLING="NO" name=MENU src="Menuconnection.htm">
<FRAME SCROLLING="NO" name=MAIN src="Main.htm">
</FRAMESET>
What I want to do is to detect if the mouse has not been moved,clicked or even if the keyboard has not been moved or clicked within a certain time limit. If both of these is true I want to reset the page. I have been able to write the code to detect this for the first frame. Code below:
function CountDown()
{
iTimeLeft -= 1;
if (iTimeLeft == 0)
{
iTimeLeft = 5
if (lastChangeObj != "")
{
lastChangeObj.style.color = "Gray"
lastChangeObj = ""
}
document.frmMain.submit()
}
setTimeout("CountDown()",1000)
}
setTimeout("CountDown()",1000)
then on the body tag I put this code:
<body onmousemove="ResetTimer()" onmousedown="ResetTimer()" onkeydown="ResetTimer()" onkeyup="ResetTimer()">
This works great if the mouse stays on the left frame, but if you put the mouse on the right frame then the code still runs within the right frame,
So I quess what I am looking for is away to determine if the mouse has been moved at all on the entire page, not within the Frames.