OmegaJunior said the following on 3/31/2007 1:30 PM:
On Sat, 31 Mar 2007 03:57:14 +0200, victorzou <vi********@hotmail.com>
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?
That wasn't the question, now was it?
Don't you want to know whether the web page is the topmost in
those cases as well?
Obviously not or the question would/could have been worded differently.
Or do you only need to know it if the user is browsing with MSIE?
That appears to be what was asked. Perhaps it could even be an MSIE
Intranet situation where no other browser is used.
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().
Or probably not. Try reading the question again.
Haven't tested this:
Perhaps you should. And then follow your own advice in another thread:
<quote>
First: please to validate your page using a decent validator. Try this one:
http://validator.w3.org/
</quote>
<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.
And that still doesn't answer the question that was asked.
BTW, your posting agent is broken.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ -
http://jibbering.com/faq/index.html
Javascript Best Practices -
http://www.JavascriptToolbox.com/bestpractices/