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.
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.
Try it:
in your pop up window type:
<script>
window.opener.close();
</script>
or:
<body onLoad="window.opener.clos e();">
in your pop up window type:
<script>
window.opener.close();
</script>
or:
<body onLoad="window.opener.clos
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.
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.
maybe there's an error in your window.open line...
could you post your script?
could you post your script?
ASKER
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)
setTimeout("window.close()
after 10 sec. the window will close... so 10000 means the miliseconds
=0)
ASKER
Where does this code go (in the Parent window head)? Will it still bring up an alert?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks so much for confirming this dilemma for us. Much appreciated.
"The window is trying to close. Do you want it to close?"