Connecting Tech Pros Worldwide Help | Site Map

active browser

  #1  
Old July 20th, 2005, 12:23 PM
sean
Guest
 
Posts: n/a
Have this problem, please

- I have an HTML page with a timer on it.
- Start the timer when the page is loaded.
- Display an alert from 1 to 1 minute based on the timer.

- If I launch this page in 2 browsers on my comp I want to have the
alert only from the active window as if the other page is minimized or
doesn't have focus to NOT display the alert (timer could running
though).

Any ideas?

Jack
  #2  
Old July 20th, 2005, 12:24 PM
W d'Anjos
Guest
 
Posts: n/a

re: active browser


You can track window focus through the 'onfocus' and 'onblur' events.
By using them you can keep the window focus status on a 'hasFocus'
variable, which is then checked by your timer function to control the
alert display.

I hope this helps.

-Wagner

jackie_sean@yahoo.se (sean) wrote in message news:<d96513dd.0310270727.716e2bfb@posting.google. com>...[color=blue]
> Have this problem, please
>
> - I have an HTML page with a timer on it.
> - Start the timer when the page is loaded.
> - Display an alert from 1 to 1 minute based on the timer.
>
> - If I launch this page in 2 browsers on my comp I want to have the
> alert only from the active window as if the other page is minimized or
> doesn't have focus to NOT display the alert (timer could running
> though).
>
> Any ideas?
>
> Jack[/color]
  #3  
Old July 20th, 2005, 12:26 PM
sean
Guest
 
Posts: n/a

re: active browser


not bad, not bad at all
lots of thanks, I will give a tray later on
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
set refresh rate for an active browser window Bill Nguyen answers 10 December 5th, 2006 12:55 AM
Legacy code/browser compatibility David Golightly answers 27 November 25th, 2006 12:35 AM
How to get the width/height of the active area in a browser? Jim Ciotuszynski answers 2 November 17th, 2005 11:35 PM