how to know whether the webpage is the top active IE window with javascript code

V

victorzou

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
 
O

OmegaJunior

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.
 
O

OmegaJunior

OmegaJunior said the following on 3/31/2007 1:30 PM:

That wasn't the question, now was it?


Obviously not or the question would/could have been worded differently..


That appears to be what was asked. Perhaps it could even be an MSIE
Intranet situation where no other browser is used.



Or probably not. Try reading the question again.


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/


And that still doesn't answer the question that was asked.

BTW, your posting agent is broken.

Then please enlighten us and explain how the question can be interpreted
differently?

My posting agent broken? How so?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top