ajax preloader/loading

Discussion in 'JavaScript' started by cosminx2003, Jul 23, 2008.

  1. #1
    Hi, i made a php application that shows the results with ajax (without page reloading), the request it's made in 30 sec, it;s too much and the user will think that the application doesn't work, so i want to put a preloader or a loading script.

    PS: i searched on google and i found just 2-3 scripts that don't work.
    Thanks.
     
    cosminx2003, Jul 23, 2008 IP
  2. joshchan214

    joshchan214 Peon

    Messages:
    79
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    joshchan214, Jul 24, 2008 IP
  3. ToddMicheau

    ToddMicheau Active Member

    Messages:
    183
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    58
    #3
    Well with ajax you have a specific portion of the html you are setting to the returned text, yea? Why not- before you initiate your socket- just set that portion to "Loading, please chill. . ."

    You could even make a neat little timer that starts when the function is called and ends when the socket is finished, something that updates the text so the user knows data is being processed. (Or even an animated gif. . .)

    Wouldn't be hard at all to do, and if you post the link I can give you the updated code to do it.

    ~Todd
     
    ToddMicheau, Jul 24, 2008 IP
  4. cosminx2003

    cosminx2003 Active Member

    Messages:
    581
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    60
    #4
    cosminx2003, Jul 24, 2008 IP