Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2009-04-09
9
Medium Priority
?
882 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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 400 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 400 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

916 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