Solved

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

Posted on 2009-04-09
9
874 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
The Orion Papers

Are you interested in becoming an AWS Certified Solutions Architect?

Discover a new interactive way of training for the exam.

 

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

Quiz: What Do These Organizations Have In Common?

Hint: Their teams ended up taking quizzes, too.

Question has a verified solution.

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

This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to dynamically set the form action using jQuery.

690 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