Connecting Tech Pros Worldwide Help | Site Map

active browser

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 20th, 2005, 11:23 AM
sean
Guest
 
Posts: n/a
Default active browser

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, 11:24 AM
W d'Anjos
Guest
 
Posts: n/a
Default 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, 11:26 AM
sean
Guest
 
Posts: n/a
Default Re: active browser

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

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.