|
-
Mar 5th, 2008, 08:00 AM
#1
Thread Starter
Lively Member
display something untill the php returns value
Hello
I want to know how can i display something untill php returns a value
example:
the server is gathering data from several sites Site A , Site B and Site C
while the server is gathering data from Site A i want it to display "gathering data" besides "Site A" and when it returns a value i want it to display "Finished" and the same thing for Site B and Site C.
i know this also will include javascript...
can someone give me alittle help in that i have tried searching and couldn't find any examples
Cheers
Adel
-
Mar 5th, 2008, 01:47 PM
#2
Re: display something untill the php returns value
The a look for the XMLHTTPRequest object in Javascript, it will enable you to make a request periodically and update the status. You don't need to use Javascript, you could use output buffers. But I would not recommend that because it will give you only limited control over the process.
Don't forget also the ignore_user_abort() function if you don't want the user to stop it by pressing the stop button in the browser.
-
Mar 6th, 2008, 03:18 PM
#3
Thread Starter
Lively Member
Re: display something untill the php returns value
Thanks alot for Your reply
but Can you give me just a small code example?
like i want it to send a request every 1 second to File.php where this file will return an output then print that output on everyrequest untill the output is equal to Something then it stops sending requests...
Thanks Alot for your help in advance
-
Mar 6th, 2008, 03:36 PM
#4
Re: display something untill the php returns value
Check out the Ajax link in my signature.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|