Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] disabled window detections


  • From: flavio at economisa.com.br (Flávio Gomes)
  • Subject: [Javascript] disabled window detections
  • Date: Fri Oct 13 16:14:16 2006

Havent found a builtin function for that but this might work:

<body onload="startIt(document.window)">

(..)

function startIt(oWindow)
{  oWindow.setAttribute("focused", true);
   oWindow.onFocus = function() { oWindow.setAttribute("focused", true); 
   oWindow.onBlur = function() { oWindow.setAttribute("focused", false);
}


Not sure if is it the nice and neat way but.... as I said: might work =)



Diego Chagastelles escreveu:

> Example: when my page is inactive or disabled (I dont know) Gmail play 
> a little sound when a message comes. When the page is active there?s 
> no sound.
>
> On 10/13/06, * Fl?vio Gomes* <flavio@xxxxxxxxxxxxxxxx 
> <mailto:flavio@xxxxxxxxxxxxxxxx>> wrote:
>
>     Disabled?
>
>     Diego Chagastelles escreveu:
>
>     > How can I detect when my page is disabled?
>     >
>     >------------------------------------------------------------------------
>     >
>     >_______________________________________________
>     >Javascript mailing list
>     >Javascript@xxxxxxxxxx <mailto:Javascript@xxxxxxxxxx>
>     >https://lists.LaTech.edu/mailman/listinfo/javascript
>     <https://lists.LaTech.edu/mailman/listinfo/javascript>
>     >
>     >
>
>     --
>     Flavio Gomes
>     flavio@xxxxxxxxxxxxxxxx <mailto:flavio@xxxxxxxxxxxxxxxx>
>
>     _______________________________________________
>     Javascript mailing list
>     Javascript@xxxxxxxxxx <mailto:Javascript@xxxxxxxxxx>
>     https://lists.LaTech.edu/mailman/listinfo/javascript
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Javascript mailing list
>Javascript@xxxxxxxxxx
>https://lists.LaTech.edu/mailman/listinfo/javascript
>  
>

-- 
Flavio Gomes
flavio@xxxxxxxxxxxxxxxx