Welcome to WebmasterWorld Guest from 54.144.80.75

Forum Moderators: open

Message Too Old, No Replies

Detect Inactive Window

Detect Inactive Window

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

Junior Member

5+ Year Member

joined:Apr 20, 2006
posts:109
votes: 0


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 Sept 24, 2007 (gmt 0)

Senior Member from US 

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

joined:Aug 26, 2004
posts:3145
votes: 12


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 Sept 27, 2007 (gmt 0)

Junior Member

5+ Year Member

joined:Apr 20, 2006
posts:109
votes: 0


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

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members