Indeterminate progress bar

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #16
    You can't use document.write after the page has loaded.

    Above your form, you could have a div:
    [HTML]<div id="loading" style="visibili ty:hidden">trac ert is running in the background.<img src="show_loadi ng.gif"></div>
    [/HTML]
    Then in progress(), just replace the document.writes with:
    [CODE=javascript]document.getEle mentById("loadi ng").style.visi bility = 'visible';[/CODE]

    Comment

    • techieGirl
      New Member
      • Nov 2007
      • 13

      #17
      Originally posted by acoder
      You can't use document.write after the page has loaded.

      Above your form, you could have a div:
      [HTML]<div id="loading" style="visibili ty:hidden">trac ert is running in the background.<img src="show_loadi ng.gif"></div>
      [/HTML]
      Then in progress(), just replace the document.writes with:
      [CODE=javascript]document.getEle mentById("loadi ng").style.visi bility = 'visible';[/CODE]
      Many Many thanks to you!!! I didn't knew it was so simple - Sorry I was trying the wrong thing. Did not read anywhere that we can't use document.write after the page has been loaded or I might not have understood what the problem could be.

      Lovely!!! You are a star!!!!

      But just one last thing please, the gif image is not moving. The circle which shows loading is just there but not moving like a GIF should. If it can't be done, then also I am happy to just display the text. This would solve the purpose.

      Thanks again!!! I am so glad that I posted my question here.

      Regards...

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #18
        Originally posted by techieGirl
        Many Many thanks to you!!! I didn't knew it was so simple - Sorry I was trying the wrong thing. Did not read anywhere that we can't use document.write after the page has been loaded or I might not have understood what the problem could be.
        Technically speaking, you could, but that would open the document for writing again which is not what you want.
        Originally posted by techieGirl
        But just one last thing please, the gif image is not moving. The circle which shows loading is just there but not moving like a GIF should. If it can't be done, then also I am happy to just display the text. This would solve the purpose.
        You need an animated gif. Are you sure it is animated?

        Comment

        • techieGirl
          New Member
          • Nov 2007
          • 13

          #19
          Originally posted by acoder
          Technically speaking, you could, but that would open the document for writing again which is not what you want.
          You need an animated gif. Are you sure it is animated?
          Hi Acoder,

          Yes it is an animated GIF. I think we have displayed the GIF on click and passed the control to Page2 which is want I wanted. But GIF is not working. And I am sure this time that its an animated one. When the code was not right, it used to iterate. :)

          Comment

          • acoder
            Recognized Expert MVP
            • Nov 2006
            • 16032

            #20
            Originally posted by techieGirl
            Yes it is an animated GIF. I think we have displayed the GIF on click and passed the control to Page2 which is want I wanted. But GIF is not working. And I am sure this time that its an animated one. When the code was not right, it used to iterate. :)
            It may be because the form is being submitted to the next page and the image is 'frozen'.

            Comment

            • techieGirl
              New Member
              • Nov 2007
              • 13

              #21
              Originally posted by acoder
              It may be because the form is being submitted to the next page and the image is 'frozen'.
              Yes that's what I think it is. But displaying just the text would do for me. Thanks a lot...

              Comment

              • acoder
                Recognized Expert MVP
                • Nov 2006
                • 16032

                #22
                No problem, you're welcome.

                Post again any time if you have more questions.

                Comment

                Working...