bruce wrote:
i want to be able to display some text/content and to then redirect the user to another page. basically: cat.php -echo " test content<br>" -echo " more test content<br>" //redirect user echo" <script> location.href='foo.php'; </script> "; --------------- foo.php -echo "i'm here" should be pretty simple... however, in my test, without the script/location.href i display the content ok. when i add the script/location.href, i get redirected, but the content is never displayed... any thoughts/samples/pointers on what might be going on, and how this should really be accomplished.. to be honest, i'm embarrassed to even be raising this here!!
And so you should be what with it being a Javascript question and this being a PHP list.
Anyhoo, I don't get your confusion. The browser will run the script as it loads it from your site. Ergo, it redirects before it displays what you have output. I suggest you Google for examples of the settimeout Javscript function - that's what you need to delay the redirect.
-Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php