laconica Posted August 7, 2008 Share Posted August 7, 2008 How do I load a page display it for 30secs then display the next page At present it does all the delays BEFORE anything loads! Link to comment https://forums.phpfreaks.com/topic/118630-solved-load-multiple-pages/ Share on other sites More sharing options...
blufish Posted August 7, 2008 Share Posted August 7, 2008 You would have to use javascript to do this, because php is server-side scripting you cannot change things after the page has loaded. <script type='text/javascript> parent.location="http://www.google.com"; </script> would redirect instantly with javascript. Link to comment https://forums.phpfreaks.com/topic/118630-solved-load-multiple-pages/#findComment-610716 Share on other sites More sharing options...
laconica Posted August 7, 2008 Author Share Posted August 7, 2008 Thanks, that was what I was thinking but I want to load a page, show it for 20secs then show the next page There might be 10 pages Any ideas Link to comment https://forums.phpfreaks.com/topic/118630-solved-load-multiple-pages/#findComment-610721 Share on other sites More sharing options...
blirette Posted August 7, 2008 Share Posted August 7, 2008 But sure to put the code at the bottom of the page so it loads all the content before strating the countdown (or maybe JavaScript client-side only starts when the page is fully loaded....?). Dynamically write the JS function depending on the referal page maybe? Should be ok to do that. Link to comment https://forums.phpfreaks.com/topic/118630-solved-load-multiple-pages/#findComment-610798 Share on other sites More sharing options...
laconica Posted August 8, 2008 Author Share Posted August 8, 2008 Thanks for your input guys Had to solve it with java script in the end as you cannot use header() after you have put something on the page Just used this with <?php and echo <html> <head> <script language="Javascript"> function forward(){ location.href="http://thurrock.rugby-club.info/scroll2.html"; } </script> </head> <body onload=setTimeout('forward()',10000)> <p>This is the first page</p> </body> </html> Link to comment https://forums.phpfreaks.com/topic/118630-solved-load-multiple-pages/#findComment-611471 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.