how to bring the new window in front of old window

Hi everyone,

Here is what I have:

there is a hyperlink on Page1.jsp, which opens another page Page2.jsp through onclick=

window.open('./faces/Page2.jsp','mywindow','width=500','height=600');

However, after Page2.jsp is opened in a new window, it is always behind the old window with Page1.jsp. That is, Page1.jsp always gets the focus. I have to click Page2.jsp at windows' bottom bar in order to bring it up.

How to set Page2.jsp window in front of Page1.jsp window as default?

Thanks in advance,

[551 byte] By [bronze-starDukes] at [2007-11-26 12:13:30]
# 1
it should have the focusjsut tried your code and my browser keeps focused on the other windowi would be looking elsewhere for your problemmaybe in your browsers setup?
bronzestar at 2007-7-7 14:14:53 > top of Java-index,Archived Forums,Socket Programming...
# 2
winId = open.window(....);winId.focus();
bronzestar at 2007-7-7 14:14:53 > top of Java-index,Archived Forums,Socket Programming...