Click to See Complete Forum and Search --> : How to automatically close one past window?


alvarohig
03-10-2003, 02:20 AM
I have a transitional window "transition.html" (that is opened with a password).
It has the following code to open automatically "newwindow.html"
<script>
function winopen(){....
</script>
</HEAD>
<BODY>
<body onLoad="winopen()">

But how could it CLOSE automatically "transition.html" after "newwindow.html" is opened?

Thanks for your help.

A. Higueras

fkn
03-10-2003, 04:18 AM
You could make the transition.html close after a certain amount of time by putting this line into your body tag (in transition.html):

<BODY onLoad="setTimeout(window.close, 5000)">

5000 milliseconds may be to fast, but maybe 30000 is enough.

Hit me back if you donīt like this solution...

Nicodemas
03-10-2003, 06:26 AM
Or add an onLoad event handler into the window that opens up.

onLoad="opener.close()"