Remove parent window after launching child

citegirl
citegirl used Ask the Experts™
on
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.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
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?"

Commented:
Try it:

in your pop up window type:

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

or:

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

Author

Commented:
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.
Success in ‘20 With a Profitable Pricing Strategy

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Author

Commented:
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.

Commented:
maybe there's an error in your window.open line...

could you post your script?

Author

Commented:
Another related idea: Can an auto-expire be added to the parent window to make it go away after a certain amount of time?

Commented:
you can use:

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

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

=0)

Author

Commented:
Where does this code go (in the Parent window head)? Will it still bring up an alert?
Commented:
yes it goes in the parent window... and it'll still bring up the alert...

Author

Commented:
Thanks so much for confirming this dilemma for us. Much appreciated.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial