Baabu Posted March 4, 2008 Share Posted March 4, 2008 <script> setTimeout("location='index.php'", 3000); // Execute the statement location='index.php' after 3000 miliseconds (3 seconds) </script> well how can i put $url="http://www.somesite.com" in place of index.php in the above script Quote Link to comment Share on other sites More sharing options...
aebstract Posted March 4, 2008 Share Posted March 4, 2008 setTimeout("location=$url", 3000); ? Quote Link to comment Share on other sites More sharing options...
Baabu Posted March 4, 2008 Author Share Posted March 4, 2008 well this worked but how should i make it work for a php variable <script> $url="http://mysite.com" setTimeout("location=$url", 3000); // Execute the statement location='index.php' after 3000 miliseconds (3 seconds) </script> i want to know how to use it with this form <?php $url="http://mysite.com" ?> <script> setTimeout("location='$url'", 3000); // Execute the statement location='index.php' after 3000 miliseconds (3 seconds) </script> 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.