Thread: Loop php script

  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Rep Power

    Loop php script

    I'm looking for some JS which which can run a php script in a loop until it returns a success message. Also, it should display a loading gif while the php runs (takes a few seconds). It should all be triggered by a href link.

    I know very little about JS, and as such I have been trying to find bits and pieces of code on forums to assemble a working script - needless to say, without much luck.

    If anyone could post me a working example of something similar, it would be a huge help. Especially the part where it should stop refreshing/retrieving the output when the php outputs a success message.

    Also, please let me know if this is not the right forum/section.
  2. #2
  3. A Not To Shabby Code Smurf
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Aug 2008
    Rep Power
    If you use AJAX, especially jQuery .ajax() API; you will receive responseText, when your AJAX function receives conformation, from your PHP page; that it has successfully completed your task.

IMN logo majestic logo threadwatch logo seochat tools logo