If you want to use pure Ajax, you'll need to do continual polling of the server to find the status, which is probably more effort than it's worth.
Another technique would be to post to an iframe, then in your controller action you would use echo and flush() after every 10 records to push your status to the browser. This will appear gradually, much like what you're wanting, but it is a dodgy way to do it. However, deleting 471 records shouldn't really take much time at all and you probably don't need a progress indicator. If it does take a while, I would find a way to optimize that instead of creating a progress indicator. Cheers, Adam On Apr 10, 8:16 am, gmwebs <[EMAIL PROTECTED]> wrote: > I have been playing around with the Ajax helper and am trying to > display the progress of a script, in realtime, called by $ajax->link(). I > have seen how the different callbacks work, but I can't > > seem to find if there is a way to send a series of responses during > the call to the server script. > > Just for demo purposes, I have successfully updated a <div> after each > callback (before, loading, loaded, interactive, complete) but as far > as I understand these are just the different states of XMLHTTPrequest. > > I need to delete X amount of rows from a table and would like to > notify the user after every Y amount have been deleted. Kind of like a > progress bar or little console <div>. > > For example: A user clicks on a link and gets the following underneath > it in an ajax->div. > > *** starting the delete process *** > > 471 records found. > > deleting rows 1 to 10 - success > deleting rows 10 to 20 - success > ... > all records deleted successfully > > *** delete process ended *** > > I hope I have explained myself enough here! Any advice would be > greatly appreciated. > > Thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
