|
Posted by Aerik on 04/13/07 19:02
> - Have your original PHP store it's "status" information in a Session
> variable says $_SESSION["status_data"] which is updates as it runs
>
> - Have a timer on the Javascript side which creates a 2nd Ajax call
> to a new getstatus.php, which then reads the status from the session and
> sends back to the browser in this 2nd Ajax call.
>
> Not done much Ajax, I am assuming you can make another ajax call whilst
> one is currently running??
Wow, that's really clever actually. The only think I'm not sure about
is when first script actually saves the session data - I don't know if
it gets saved as it's set, or if it saves it when the script
completes. Yes, you can definitely send multiple ajax requests. I
think what will happen if the script runs really long is that the
first one might time out - I'm really not sure. But you should
definitely be able to get the process going with one ajax call, then
poll the second script for the status. Yeah, I'd love to hear how
this works out as well...
Aerik
Navigation:
[Reply to this message]
|