pereubu123
Instructor
- Jul 25, 2012
- 2
There are 4 Frames. Main (main) html frame, side (side) html frames and two menu (mainmenu and search)Frames. I need to add code to detect idle timem not to the main, but to all frames or in fact the entire page.
$(document).ready(function(){
idleTime = 0;
var preLoadTimer;
$(this).mousemove(function(e){
//clear prior timeout, if any
window.clearTimeout(preLoadTimer);
….
//create new timeout.
preLoadTimer = window.setTimeout(doPreLoad, 2000);
});
});
Question is what will be document: top.document. or something else? In addition, I want to detect when users move mouse or press key, but I do not have success so far to do that. I tried to to put.top.main.document as document but it want work either.
$(document).ready(function(){
idleTime = 0;
var preLoadTimer;
$(this).mousemove(function(e){
//clear prior timeout, if any
window.clearTimeout(preLoadTimer);
….
//create new timeout.
preLoadTimer = window.setTimeout(doPreLoad, 2000);
});
});
Question is what will be document: top.document. or something else? In addition, I want to detect when users move mouse or press key, but I do not have success so far to do that. I tried to to put.top.main.document as document but it want work either.