Click to See Complete Forum and Search --> : Closing popup window


lunitari_8100
03-04-2003, 02:20 PM
Okie please if anyone can help.i want to add a flash movie i found to my web site as the introduction. This movie auto redirects to my site so theres no way i can put a redirect code i nmy main page to redirect to the movie cause when it does it will end up with 2 windows open. The best thing I've seen I think is perhaps I can do a pop up window thats set to close in however many seconds the movie is long. And then I would only have my main page open. Does anyone know the code for a popup window that closes after so many seconds?

Thanks!

pyro
03-04-2003, 03:05 PM
I wouldn't do it that way, if I were you. The reason is, you have no idea how long to keep the window open. You need to account for loading time... But, if you want to:

<script language="javascript" type="text/javascript">

setTimeout("window.close()",5000); //Number of miliseconds to close in. 5000 = 5 seconds

</script>

Code One
03-05-2003, 10:58 PM
why on earth would you want to relocate back to your intro from your main page? If I was you and found a reason to do something like that I would probably just add a link back to the intro page which would take place of your main page in the parent window, purhaps something a little like this:

<a href="http://www.blah.com/Myintropage.html>Intro</a>

This should redirect you to your intro page without popping up a new window.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If that doesnt work get back to me and I will find you a way for sure . . .cool?

Code One