Link to home
Start Free TrialLog in
Avatar of citegirl
citegirl

asked on

Remove parent window after launching child

We are trying to create the following:

1) Visitor login page within a conventional browser window
2) After logging in, new CHILD window pops up (no browser navigation bar)

Then this is the difficult part --

3)The PARENT window disappears (can be on the action of the user touching the screen with mouse, or anything else)

We can't seem to get rid of the orphaned window.

HELP!!! We are not experts.
Avatar of ivanmata
ivanmata

Well... you can't close a parent window without prompting the user to do it... I mean, if you use window.opener.close(); The user is gonna be prompted with something like:

"The window is trying to close. Do you want it to close?"
Try it:

in your pop up window type:

<script>
window.opener.close();
</script>

or:

<body onLoad="window.opener.close();">
Avatar of citegirl

ASKER

Thanks for the quick response; we did try that, but it was giving the error message that we were trying to eliminate, and crashed in older versions of Netscape. Is there a scenario that would accomplish the same end result that we didn't think of? We just want to end up with one window, with no navigation.
Thanks for the quick response; we did try that, but it was giving the error message that we were trying to eliminate, and crashed in older versions of Netscape. Is there a scenario that would accomplish the same end result that we didn't think of? We just want to end up with one window, with no navigation.
maybe there's an error in your window.open line...

could you post your script?
Another related idea: Can an auto-expire be added to the parent window to make it go away after a certain amount of time?
you can use:

setTimeout("window.close();",10000);

after 10 sec. the window will close... so 10000 means the miliseconds

=0)
Where does this code go (in the Parent window head)? Will it still bring up an alert?
ASKER CERTIFIED SOLUTION
Avatar of ivanmata
ivanmata

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks so much for confirming this dilemma for us. Much appreciated.