PDA

View Full Version : Problems with CaptureEvent


pthompson2002
08-09-2002, 10:41 AM
I am having problems gettig captureEvent to work on the pages I am doing. Here is the scenario:

I have one frame which contains all menu links. I also have a header frame which contains a countdown clock which on reaching 0:00 times the user out and forces htem to log back in. However, I would like the timer to reset, i.e go bak to 40:00 and begin the countdown again when the user clicks a link or anywhere in the menu frame. the timer is started in the header frame using the following funciton which is called using an onLoad in the body:

function startTimer() {
running = true
now = new Date()
now = now.getTime()
// If middle integer set to 60, then just change far right integer to number of mins required
endTime = now + (1000 * 10 * 1)
showCountDown()

return true;
}

I entered the following code below this function thinking it would solve my problem, but it doesn't:

window.frames('toc').captureEvents(Event.CLICK);
window.frames('toc').onclick = startTimer

I am using IE and at this point I am not concerned about it working in Netscape. Has anyone got any suggestions?

cheers

Pete

MUBNET
08-09-2002, 04:44 PM
I think you need to examine it;

window.setTimout("function();", 1000)
The 1000 is a milisecond value.

If you analyze it, you can solve your problem.

Good works :thumbsup: