window.open - Breaking the relationship between child and parent

G

google

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
 
K

kaeli

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
 
G

google

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
 
G

google

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();
 
K

kaeli

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top