473,378 Members | 1,347 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,378 software developers and data experts.

window.open - Breaking the relationship between child and parent

Hi there,

I've searched high and low for this, but it seems most people are
looking to establish (and control) the relationship between a parent
browser window and it's associated child window created with
window.open. I would like to break this connection.

Why? Because there is an application that I want to open in a new
window, but no matter what I do it will close the window and redirect
the original (parent) window to its location instead. If I'd wanted
that, I wouldn't have specified a new target window!

I've even gone so far as to open the link in a new window, that opens
the file in another (3rd) window within a frame inside a frameset. The
application closes the framed window, the opener window, and goes back
to the original window and changes the page. Talk about being a control
freak. It's the battle of the control freaks, and the program is
winning :(

Does anyone know how to break the window.open connection to its parent?
I've tried opening the new window with an empty name, and that doesn't
work. I could instruct the user to "Copy -> hit Ctrl-N, the Paste", but
that just doesn't seem appropriate for such the highly automated world
we live in. Not to mention, if I'm writing the code to open the file,
shouldn't I have the last say in which window it's opened in?

Any insight would be greatly appreciated!!

Keith D Commiskey
http://kdcinfo.com
http://giftsforyou.biz

Jul 23 '05 #1
4 3353
In article <11*********************@z14g2000cwz.googlegroups. com>,
go****@kdcinfo.com enlightened us with...

Why? Because there is an application that I want to open in a new
window, but no matter what I do it will close the window and redirect
the original (parent) window to its location instead.


I assume this is someone else's application.
Turn off javascript. Reload. Open link in new window. Navigate parent away
from original site. Turn script back on.

Keep in mind that their app may refuse to work with script turned off and if
they went to THAT much trouble, their app might break when opened in a new
window.
Got URL? I'm curious now.

--
--
~kaeli~
Profanity: the single language in which all programmers are
expert.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #2
You can programmatically turn off Javascript from the client's browser?
Wow. Didn't know that. But if it's possible to turn it off, how would
you then turn it back on if its now off?

The application is eMatrix (now known as just "Matrix"), which is a
Product Lifecycle Management application by MatrixOne. Unfortunately,
the URL I'm playing with is on our intranet.

The reasoning I was provided for why it does this is "It has to close
all the windows because of the session information that gets stored by
each browser window. If you have one session already open and start
another window with a new matrix session they will get really messed up
and you end up having to close all your browser windows."

But this thing will close however many child windows you open to get to
it, and cannot be loaded in a frame of any sort (although I haven't
tried an iFrame yet). I was told there is a switch or parameter you can
feed the URL so that it doesn't behave like this, but it hasn't been
provided yet, and I'm not certain if its a default parameter for
Matrix, or one our Matrix developers created.

I also tried to find a Matrix forum to search and possibly post to, but
I'm not a TCL, Java, or JScript developer, and I'm not a Matrix
developer of any kind: Just a developer that has to provide a pathway
to this system. The couple forums I did find were way over my head or
required registering (which I didn't feel appropriate for this one
issue). So being those were more for 'serious programmers', I figured I
would approach it from a developer's stance via HTML/Javascript.

Thanks for the feedback though. Food for thought...

Keith D Commiskey
http://kdcinfo.com
http://giftsforyou.biz

Jul 23 '05 #3
I found an answer that I've tested on WinXP: IE6, NS7.1, Opera 7.51,
and FireFox .9.2

http://www.faqts.com/knowledge_base/view.phtml/aid/1886

Before
#1 -> #2 --> #3
\.-> Close #2 (#3 closed #2, then #1)

After
#1 -> #2 --> #3 ... -> (#3 now has nothing to close and is broke from
#1)
\.-> Close #2

#1 = Original window
#2 = New target window (with window.open)
#3 = 2nd new target window (with window.open)

Here's what worked - Code placed in Window #2
window.open('Window-Number-3.html');
self.close();

Jul 23 '05 #4
In article <11*********************@f14g2000cwb.googlegroups. com>,
go****@kdcinfo.com enlightened us with...
You can programmatically turn off Javascript from the client's browser?
Wow. Didn't know that.
You can turn it off yourself, by hand. As one person using a browser. It's in
the options (browser dependent).

As a programmer, in your OWN PAGE, you can kill all scripts by removing them
programmatically. Browser must support certain methods.

You cannot, from your web page, disable all scripting on the client for ALL
web pages. (talking normal internet here, not HTA apps or anything)

The reasoning I was provided for why it does this is "It has to close
all the windows because of the session information that gets stored by
each browser window. If you have one session already open and start
another window with a new matrix session they will get really messed up
and you end up having to close all your browser windows."
Yeah, that does happen sometimes. I just tell (in the FAQ) my clients not to
open multiple windows b/c it screws up the sessions. If they don't listen,
not MY problem. Going as far as they did seems rather, well, retarded.

But this thing will close however many child windows you open to get to
it, and cannot be loaded in a frame of any sort (although I haven't
tried an iFrame yet).
Since it isn't your app, there is little you can do about it, really. As a
person browsing to the site, you can disable script on your own browser.
That's about it.
I was told there is a switch or parameter you can
feed the URL so that it doesn't behave like this, but it hasn't been
provided yet, and I'm not certain if its a default parameter for
Matrix, or one our Matrix developers created.


I'd wait for them to give that to you. Solves your problems.
Of course, this being a javascript forum, I'm assuming you're doing this from
a browser over the internet. Like, you have a site that has to link to
theirs, or something.
If this is (or can be) a console solution (or MSIE HTA), you have plenty of
options. .NET has a browser component, as do other languages, for the windows
platform.
The web is great for a lot of things, but it isn't great for ALL things.

I might be able to help more if you tell me exactly what you're trying to do,
the target browsers (if any), target platform (if any), etc.

--
--
~kaeli~
User: The word computer professionals use when they mean
'idiot'.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #5

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

Similar topics

3
by: Will | last post by:
I have a parent/child relationship between two windows. The parent spawns the child using something like this. windowHandle = window.open("child.aspx","child"); the problem is that if the...
2
by: Random | last post by:
To grossly oversimplify my webapp: I am using PHP to communicate with IMAP, outputting relevant information as JavaScript. The information is aggregated in an extremely heavily-scripted status...
4
by: Davey | last post by:
I have a website which has a popup window (this only opens when the user chooses to open it). In the popup window I have a <select> control which lists a selection of "classes". Each class has a...
2
by: Raj | last post by:
Hi All, I have a problem with trying to refresh the parent window from child window in order to update data in the parent window. The sequence of events are 1) I click a button in the parent...
1
by: Earl Teigrob | last post by:
I did a ton of searching to try and find a simple solution to this issue and finally wrote my own, which I am sharing with everyone. In my searching, I did find a very complete and robust solution at...
7
by: MrFez | last post by:
Through some investigation it appears that selecting "Every visit to the page" for the IE caching setting "Check for new version of stored pages" causes the window.opener property of child windows...
2
by: Robert Degen | last post by:
Hello, I got a little problem. Seems very simple: * I want to open a popup window * Popup-window uses data from its father window. BUT a parent.window does NOT point to the real parents...
2
by: epaetz | last post by:
Is there a way to decouple the linkage between a parent and a child window? Does the parent window have any sort of a collection that holds all the children that it has spawned? I want to...
8
by: Pivot_Tables | last post by:
Hi, I have created a recursive SQL Query in DB2 and it works fine until some point in the tree where the data gets into infinite loop. Below are some sample data from my relationship table. ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.