Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-23-2009, 11:57 AM   PM User | #1
nikhilgonsalves
New to the CF scene

 
Join Date: Oct 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
nikhilgonsalves is an unknown quantity at this point
Really weird behavior of window.focus() method

Hi all,

I am facing a really weird situation with window.focus(). Bascially the user is prompted with a confirm box after a certain amount of time of inactivity on the page. To get the window in focus, we are usign the window.focus() method.

Below is the snippet of code:

Code:
setTimeout("function(){window.focus();confirm('continue?');}",inactivevalue);
Here is the weird behavior:
If the window where the code is minimized, it works fine. The window comes back into focus and the confirm box is displayed.

But, if the window where the code is placed inteh background using ALT+TAB, the code does not work. the window does not come back into focus. Instead, the taskbar icon blinks, indicating that some activity has occured.

Please help!

Nikhil
nikhilgonsalves is offline   Reply With Quote
Reply

Bookmarks

Tags
window.focus()

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:30 PM.


Advertisement
Log in to turn off these ads.