Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Jan 2008
    Posts
    31
    Thanks
    4
    Thanked 0 Times in 0 Posts

    show loading image when updating page?

    hello guys,

    how can i show an animated gif when user clicks a link and page uplaods?

    i just want the gif to be displayed over the content, then when the data has been retrieved, the page can be updated (and content changes).

  • #2
    Regular Coder ohgod's Avatar
    Join Date
    Jun 2008
    Location
    Ohio
    Posts
    579
    Thanks
    6
    Thanked 69 Times in 69 Posts
    in your ajax request you need to use a statement for the onReadyStateChange for 2 or 3 i think. 2 being request sent, 3 says it's being processed.

  • #3
    New Coder
    Join Date
    Jan 2008
    Posts
    31
    Thanks
    4
    Thanked 0 Times in 0 Posts
    thanks man, but i know how to do the ajax part.

    i dont know how to put the gif over the content.


    please help

  • #4
    Regular Coder ohgod's Avatar
    Join Date
    Jun 2008
    Location
    Ohio
    Posts
    579
    Thanks
    6
    Thanked 69 Times in 69 Posts
    oh....

    just make a div, style it how you want and hide it by default with display: none;


    then at the beginning of your call show it, and when it's complete hide it again



    as for the styling, that's all css. to make it show up on top of everything else tweak it's zindex. after that it's just positioning.

  • Users who have thanked ohgod for this post:

    kejo (11-03-2008)


  •  

    Posting Permissions

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