Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. Have a loading animation while server-side is working

Have a loading animation while server-side is working

Scheduled Pinned Locked Moved Web Development
javascriptsysadmintutorialquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    livez
    wrote on last edited by
    #1

    Hello! I have a page from which the user can export data. This can take quite a while if alof of data is to be exported. I have tried showing a loading animation(.gif) while the user waits, but to no avail. I got it working in firefox by appending a gif-image to the page using javascript when user clicks submit-button, but in IE the gif-image shows fine but doesnt move. Anyone got an idea how to achieve this?

    S 1 Reply Last reply
    0
    • L livez

      Hello! I have a page from which the user can export data. This can take quite a while if alof of data is to be exported. I have tried showing a loading animation(.gif) while the user waits, but to no avail. I got it working in firefox by appending a gif-image to the page using javascript when user clicks submit-button, but in IE the gif-image shows fine but doesnt move. Anyone got an idea how to achieve this?

      S Offline
      S Offline
      Shog9 0
      wrote on last edited by
      #2

      The easiest way to do this is to start sending the server response immediately - just the start of a document with progress indicator - and not finish the response until your task is complete. The downside of this technique is two-fold: you're limited in how long you can keep a connection open, and you're keeping a connection open the entire time; if you expect more than a handful of simultaneous users, this will kill your server. More efficient techniques can make use of AJAX, META-refresh, or script-driven postback. CP has a number of articles on the subject[^].

      ----

      You're right. These facts that you've laid out totally contradict the wild ramblings that I pulled off the back of cornflakes packets.

      L 1 Reply Last reply
      0
      • S Shog9 0

        The easiest way to do this is to start sending the server response immediately - just the start of a document with progress indicator - and not finish the response until your task is complete. The downside of this technique is two-fold: you're limited in how long you can keep a connection open, and you're keeping a connection open the entire time; if you expect more than a handful of simultaneous users, this will kill your server. More efficient techniques can make use of AJAX, META-refresh, or script-driven postback. CP has a number of articles on the subject[^].

        ----

        You're right. These facts that you've laid out totally contradict the wild ramblings that I pulled off the back of cornflakes packets.

        L Offline
        L Offline
        livez
        wrote on last edited by
        #3

        Thanks for your reply!

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups