bas7320 Posted January 12, 2008 Share Posted January 12, 2008 Is there any way using PHP to have a page display for a set amount of time (say 5 sec.) and then have it automatically close without the need for user interaction? Quote Link to comment Share on other sites More sharing options...
Daukan Posted January 12, 2008 Share Posted January 12, 2008 You can redirect to another page <?php header('Refresh: 5; url=index.html'); ?> Quote Link to comment Share on other sites More sharing options...
br0ken Posted January 12, 2008 Share Posted January 12, 2008 In the past I've always just used the following piece of Javascript: setTimeOut('window.close()', 5000); The setTimeOut function evaluates the code in the first argument after the amount of time (in miliseconds) has surpassed in the second argument. Quote Link to comment Share on other sites More sharing options...
Daukan Posted January 12, 2008 Share Posted January 12, 2008 setTimeout() only closes windows that were opened by javascript like a pop up. It can also be disabled. In firefox I get a message something like this: This window is trying to close. Do you want it to 'yes' , 'no' Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.