Re: how to know whether the webpage is the top active IE window with javascript code
- From: OmegaJunior <omegajunior@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 31 Mar 2007 19:30:17 +0200
On Sat, 31 Mar 2007 03:57:14 +0200, victorzou <victor.zou@xxxxxxxxxxx> wrote:
hi all ;
I am new guy!
I need to know whether the webpage is the top active IE window
with javascript in the webpage,when I open 2 or more IE window.
tks in advance!
victor.zou
What if the user is browsing with Opera or Firefox? Don't you want to know whether the web page is the topmost in those cases as well? Or do you only need to know it if the user is browsing with MSIE?
Other than that, figuring out which window is the active topmost on a user's computer can probably be figured out using window.onfocus() or document.onfocus().
Haven't tested this:
<html>
<body onfocus="alert('Hello, world!')">
<p>Hello, world!</p>
</body>
</html>
then when switching between different browser windows with the same page, each page should alert.
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
.
- Follow-Ups:
- References:
- Prev by Date: Re: JavaScript in IE7
- Next by Date: Re: how to know whether the webpage is the top active IE window with javascript code
- Previous by thread: how to know whether the webpage is the top active IE window with javascript code
- Next by thread: Re: how to know whether the webpage is the top active IE window with javascript code
- Index(es):
Relevant Pages
|