Forum Moderators: open

Message Too Old, No Replies

Ensuring a new window is "on top"

         

PeterB

4:19 pm on Nov 28, 2008 (gmt 0)

10+ Year Member



I am trying to open a window without all the usual toolbars etc at the top. The first window opened by IE7 has all these bars so I immediately open a second one without the bars. The two htm files are below.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>*** Window_A.htm ***</title>
</head>
<body >
Window A <script language="JavaScript" type="text/javascript">
var w_big = window.open("Window_B.htm", "big_window","width=" + (screen.availWidth - 10) + ",height=" + (screen.availHeight - 50) + ",status=yes,resizable=yes,scrollbars=yes");
w_big.moveTo(0,0);
</script>
</body>
</html>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>*** Window_B.htm ***</title>
</head>
<body>
Window B
</body>
</html>

If I click on Window_A.htm it writes "Window A" OK and then opens Window_B.htm correctly. However Window A is on top rather than Window B.

I use this scheme for a club website. Most users including myself get Window A on top of Window B as required. But several club members get Window A on top of Window B. How do I ensure that Window B is always on top of Window A? Most use XP and IE7 but I think there are a few Vista.

Thanks

swa66

3:00 am on Nov 29, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



While this will make me run away (well I won't notice, I keep javascript off by default) and breaks the back button seriously ... [hint: reconsider]

how about adding "w_big.focus();" ?

PeterB

10:13 am on Nov 29, 2008 (gmt 0)

10+ Year Member



Thanks. I have tried this and adding var w_open = self;..... w_open.blur(); but no better.
When I open Window A with IE, Window B is displayed with dark blue top line(whatever it is called) and dark blue entry in Task bar, ie that window has keyboard focus but it is not on top. I want it on top
automatically.