View Full Version : javascript frameset events

01-08-2004, 04:49 PM
Hello all. I'm new to the board and hope to get help as well as provide help for others. I am trying to time out a user after 20 mins of inacitivity. To do this I am using some timeout functions in javascript. The problem is I want to be able to monitor inactivity in a frameset. I tried to use onClick and onKeyPress, but this will not work in a frameset. I know there is a way to do this, but I'm new to javascript. Any help would be appreciated.

<frameset rows="60,*" border="0" onload="framenumber()";>
<frame src="C:/rsspMenu.jsp" name="topFrame" marginwidth="0" marginheight="0" scrolling="Auto" frameborder="No" noresize framespacing="0">
<frame src="rsspHome.htm" name="bottomFrame" marginwidth="5" marginheight="20" scrolling="Auto" noresize>

01-08-2004, 11:08 PM
function initEventHandling () {
for (var f = 0; f < frames.length; f++)
frame[f].document.attachEvent('onkeypress', ieFrameChecker);
function ieFrameChecker () {

attachEvent is a microsoft function
windows.captureEvents(Event.EventType) works for netscape I believe.