raman Posted May 26, 2009 Share Posted May 26, 2009 I want that my PHP script should display a wait message "Please wait, you job is under processing" while the script is not done. For this I am trying to use file_exists function to check whether the output file exists or not, while(!file_exists($result)){ # some code for which I need help echo "<META HTTP-EQUIV=\"refresh\" content=\"10;URL=selfscript.php" } I want that in the portion where I have put # some code for which I need help, there should be some code, something like meta tags that will keep refreshing the page every 10 seconds till the job is done and display the output when $result is available. Can someone help me with the exact code. Link to comment https://forums.phpfreaks.com/topic/159683-php-waiting-page/ Share on other sites More sharing options...
gevans Posted May 26, 2009 Share Posted May 26, 2009 What you're trying to do wont work with only php. php is server side and will only pass data to the browser for parsing. You may want to consider using ajax. You can display a message on the client side while an ajax request is sent executing another php script to somplete a task. On it's completion you use javascript to update the page content appropriately. Link to comment https://forums.phpfreaks.com/topic/159683-php-waiting-page/#findComment-842192 Share on other sites More sharing options...
raman Posted May 26, 2009 Author Share Posted May 26, 2009 Thank you but I don't know either Ajax or javascript, can you tell me the code for that. And please explain the code you have sent. Link to comment https://forums.phpfreaks.com/topic/159683-php-waiting-page/#findComment-842208 Share on other sites More sharing options...
gevans Posted May 26, 2009 Share Posted May 26, 2009 This is very ambigious, you'd be better looking at some tutorials. I'd recomend jQuery as a javascript framework that will also make ajax very eaesy for you. Check www.jquery.com and look at their documentation/tutorials Link to comment https://forums.phpfreaks.com/topic/159683-php-waiting-page/#findComment-842226 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.