473,400 Members | 2,145 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,400 software developers and data experts.

IE behaviour vs. window.open

In a HTML page, I have this javascript function:

function PopWindow(WinName, WindowUrl) {
if (document.ShowDocs.show[0].checked)
popup = window.open(WindowUrl, "MyWindow")
else
popup = window.open(WindowUrl, WinName)
}

and further:

<form name="ShowDocs">
....
<input TYPE="radio" NAME="show" value=same checked>
<br>
<input TYPE="radio" NAME="show" value=diff>
....
</form>

and further:

<a href=javascript:PopWindow("win1","path/to/doc1")>document 1</a>
<a href=javascript:PopWindow("win2","path/to/doc2")>document 2</a>
<a href=javascript:PopWindow("win3","path/to/doc3")>document 3</a>

How is it that it works OK with NS4, NS7, Mozilla, but that IE opens
each document in a separate window even if the first "show" radio is
checked?

I have added an alert(document.ShowDocs.show[0].checked) at the
beginning of the function and it gives "true".

Thanks for a clue...
Jul 23 '05 #1
2 1344
> popup = window.open(WindowUrl, "MyWindow")

By "MyWindow" do you mean the name of the current window? So you are
expecting that the URL be loaded in the current window and not in a popup?

If this is true then replace this line of code with:

window.location.href = WindowURL;

no need to use the open method.

Mike
Jul 23 '05 #2
No, MyWindow is an arbitrary name for a new window. I could have
called it XYZ or WhatEver. But I really need to use open since I want
the new document to show up in another window than the one holding the
original link; if this window is not yet created, then it should be,
and if already created, it should be reused. But the real question is:
why all browsers *but IE* understand my script and what should I do
for IE to understand it too?

"Mike" <no****@please.com> wrote in message news:<c6**********@news1.wdf.sap-ag.de>...
popup = window.open(WindowUrl, "MyWindow")


By "MyWindow" do you mean the name of the current window? So you are
expecting that the URL be loaded in the current window and not in a popup?

If this is true then replace this line of code with:

window.location.href = WindowURL;

no need to use the open method.

Mike

Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jan T. Kim | last post by:
David Dorward <dorward@yahoo.com> wrote in message news:<bd7da3$ho4$1$830fa7a5@news.demon.co.uk>... > Jan T. Kim wrote: > > > I don't understand why I get this message. According to the HTML 4.01...
7
by: Severus Snape | last post by:
If you open a window with resizable=no, Opera doesn't comply.
14
by: D. Alvarado | last post by:
Hello, I am trying to open a window containing an image and I would like the image to be flush against the window -- i.e. have no padding or border. Can I make this happen with a single call to a...
1
by: Strange Cat | last post by:
Hi everyone! I have a weird problem with FormsAuthentication. I have an app that works just fine with FormsAuthentication. The user requests the homepage, he is redirected to login page,...
4
by: | last post by:
I have earlier used an HttpModule that did URL rewrites on the BeginRequest event. Now I am trying to use the same module in a different application on a new and upgraded machine (winxp sp2). ...
11
by: Alex.Svetos | last post by:
Hello, I'm trying to get a popup to keep focus when it is re-clicked. The script below is supposed to produce this exact behaviour, however it doesn't work, at least on firefox 1.0.7 and moz...
5
by: Ian | last post by:
Hi everyone, I have found some bizarre (to me...!) behaviour of the Form_Activate function. I have a form which has a button control used to close the form and a subform with a datasheet view...
13
by: Tim Marshall | last post by:
For all my apps in A97 and A2003, I write VBA code that constructs SQL statements for MS Jet. I'm encountering something really odd. I won't post the SQL, but describe the behaviour to see if...
3
by: asadikhan | last post by:
Hi, I have written a windows application with a GUI (let's call it MENU). I own the code for this application and have access to it. We have another application that is a third-part windows...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.