SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict Bravogolf's Avatar
    Join Date
    Aug 2004
    Location
    All over really :)
    Posts
    205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Loading image whilst waiting for response

    On my site, am using an ajax function
    to populate a DIV tag. The function is in PHP and since it's connecting to other external databases it could take some time to load and, since it's in PHP, the user would not know something is happening and can get click happy!

    So, my question is, dear chaps, whether it's relatively easy to say "show this animated loading gif whilst you go ahead and get the rest of the text". Then, when the text appears, switch off image

    Merry Christmas!

  2. #2
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2008
    Posts
    5,757
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When you send the ajax request, update the DOM to show a waiting image.
    When you receive the response, update the DOM to not show the waiting image.

    Javascript must be used for this.

  3. #3
    SitePoint Addict Bravogolf's Avatar
    Join Date
    Aug 2004
    Location
    All over really :)
    Posts
    205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    lol, so simple, thanks! Worked perfectly


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •