Welcome to WebmasterWorld Guest from 23.23.46.20

Forum Moderators: open

Detect Inactive Window

Detect Inactive Window

   
6:26 pm on Sep 23, 2007 (gmt 0)

5+ Year Member



can somebody help me.. plaese..

i need to know when my window will be inactive... sample is browser window 1 and browser window 2, first window1 is active, and as i transfer to window 2 which the window2 will be active and the window1 is inactive, how do i detect that on java that window1 is inactive?

any answer will apprecieted... thanks you in advance...

3:20 am on Sep 24, 2007 (gmt 0)

WebmasterWorld Senior Member jab_creations is a WebmasterWorld Top Contributor of All Time 10+ Year Member



You could probably try using window.onblur in conjunction with AJAX to send a signal to the server that the window has lost focus.

*edit*

I would recommend using window.onblur in conjunction with a JavaScript timeout function. You'll have to determine how long is too long to loose the user's attention (IE they have left the computer or window while visiting a bank site and you wish to log them out if they fail to acknowledge that they are still present).

- John

[edited by: JAB_Creations at 3:21 am (utc) on Sep. 24, 2007]

10:12 pm on Sep 27, 2007 (gmt 0)

5+ Year Member



thanks.. i will try some expirements.. :)
 

Featured Threads

Hot Threads This Week

Hot Threads This Month