faqts : Computers : Programming : Languages : JavaScript : Windows

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

24 of 47 people (51%) answered Yes
Recently 5 of 10 people (50%) answered Yes

Entry

After opening a new window, I then change the info in that window by calling window.open again. How do I get that window to the top so I can see it?
window.focus() works for IE 4.x, but only once for 5.x, as further calls to focus() don't bring it t

Nov 28th, 2000 18:06
Henk-Johan van Rantwijk, Paul Barfoot, Matthew Glidden,


Paul,
If you open a new window with something like this:
newwin = window.open('file.html','window_name','you may put options here');
Then you can use:
newwin.focus();
To bring the window to the front. This works for IE and NN browsers as
well. But special note:
The Opera browser need a filename for opening a new window! In our
example it look likes this:
Inside: file.html
<html>
<body>
</body>
</html>