Solved

Open IE Window with Java Script but break the parent child relationship between windows

Posted on 2009-04-09
9
871 Views
Last Modified: 2013-12-08
Hello,
We have some Java Script code that uses the Window.Open command to spawn a new IE window. This window contains a URL to a sign on screen that the user can then type in their user id and P/W to access this system. The "parent" window remains open for the user to use different selections to acess other options as needed.
The problem is - if they do not log out of the system correctly (from the "child" window) then there is some sort of "connection" maintained betweeen the parent window and the child window (even though the child window is closed) and it seems the "session" is maintained for the child window. Therefore if they now pick another option in the parent window and then type in the user/pw to go back into the system - they end up back where they were rather than where they "should be" based upon the user and p/w they enter in the child window.
So the question is this - is there some way to spawn a new IE window using java script that becomes completely independent of the parent window and bears no relationship to it (for example as though the user had just opened a seperate IE window from a menu again).
As I say we are using Window.Open right now - and not sure if there are additional parameters that would "disconnect" the child from its parent OR if there is a differnt command that would allow us to open IE independently.

An example of the code we are using is in the Code snippet.
MyWindow = window.open(fullurl,name,"scrollbars=yes,resizable=yes,status=yes,location=no,width=" + width + ",height=" + height + ",left=" + left + ",top=" + top);
 
MyWindow.focus();

Open in new window

0
Comment
Question by:monkmanusa
  • 4
  • 3
  • 2
9 Comments
 
LVL 20

Expert Comment

by:ChristoferDutz
ID: 24108364
How about a simple "<a href="url" target="blank">text</a>" ? This opens a brand new window and not a popup-window.
0
 
LVL 20

Expert Comment

by:ChristoferDutz
ID: 24108383
Argl ... I meant ... "_blank"
0
 
LVL 7

Expert Comment

by:ruscomp
ID: 24108443
I know that "location.replace()" (instead of "location.href") will break the history, but not sure if it will break the relationship... article here:
http://www.bloggingdeveloper.com/post/Location-href-vs-Location-replace---The-Difference-Between-JavaScript-Redirect-Methods.aspx

More here about parent-child relationships:
http://bytes.com/groups/javascript/513757-decouple-parent-window-children 
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

Author Comment

by:monkmanusa
ID: 24108959
Hi Christofer,
Thanks for the suggestion - though I am not sure how what you typed would fit into the code.
The code I showed is within the "else" clause (see addiitonal snippet) - how would what you suggested fit into othe script and where exactly?
I am not the programmer - I just happen to be out trying to find an answer to his problem........and I am not a script guru - I tinker every now and again so apologies if my question seems lame and seems obvious.
else {
    MyWindow = window.open(fullurl,name,"scrollbars=yes,resizable=yes,status=yes,location=no,width=" + width + ",height=" + height + ",left=" + left + ",top=" + top);
    MyWindow.focus();
    }

Open in new window

0
 
LVL 7

Assisted Solution

by:ruscomp
ruscomp earned 100 total points
ID: 24109053
As explained here:
http://msdn.microsoft.com/en-us/library/ms536651(VS.85).aspx

The second parameter would have to be the equivalent of "_blank"
else {
    MyWindow = window.open(fullurl,'_blank',"scrollbars=yes,resizable=yes,status=yes,location=no,width=" + width + ",height=" + height + ",left=" + left + ",top=" + top);
    MyWindow.focus();
    }
0
 

Author Comment

by:monkmanusa
ID: 24111781
Hello all,
Well - I passed this on to my guy - but did not work - we are still having the same issue.

If anyone has any other options to open a completely independent IE window - then please help.
Thanks.
0
 
LVL 20

Assisted Solution

by:ChristoferDutz
ChristoferDutz earned 100 total points
ID: 24116717
After reading your post again, I have to admit, that I doubt it is possible to achieve what you want. The problem is, that session-tracking is usually implemented by a non-persistent session cookie. When you start the IE that window/tab and all Windows it opens will be related and will share the same cookie information. A solution would be to start a completely new browser instance, but that is not possible from within the browser itself.

I would suggest, adding an "invalidate session" right before the login-execution. I don't know what server-side logic you are using. When dealing with servlets and JSPs I remember you could explicitly invalidate a session and start a new one.
0
 

Accepted Solution

by:
monkmanusa earned 0 total points
ID: 24934387
Looks like we cannot find an answer.
Never mind - but thanks anyway to everyone who tried.
0
 

Author Comment

by:monkmanusa
ID: 24934405
Closing out the open question
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I had to do a bit of research to find the answer to this question so I thought I'd share my results.  Due to our outdated mainframe systems, we need to downgrade IE9 to IE8 in order to stay compatible.  We also needed to downgrade Java.  In order to…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Google currently has a new report that is in beta and coming soon to Webmaster Tool accounts. This Micro Tutorial will highlight new features for Google Webmaster Tools.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now