Disable Javascript after refresh?

Discussion in 'JavaScript' started by abcdefGARY, Jul 20, 2006.

  1. #1
    Hello. I am currently using a javascript preloader page that displays a progress bar. However, it sometimes is stuck at 100% in Internet Explorer, and I would like to create a link that says "Click Here if the page is not responding", which will allow the user to view the page without visiting the loading page (therefore, disable the javascript).

    thanks in advance:eek:
     
    abcdefGARY, Jul 20, 2006 IP
  2. ccoonen

    ccoonen Well-Known Member

    Messages:
    1,606
    Likes Received:
    71
    Best Answers:
    0
    Trophy Points:
    160
    #2
    create the <div style="display:none;" id="complete"><a href="....">Click Here if the page is not responding"</a></div>

    find the variable that it is displaying as the percentage in javascript

    create an if statement that says:
    if(percentVar >= 99) { document.getElementById("complete").style.display='block'; }

    That should do the trick, or apply the id directly on the anchor and hide/show that.
     
    ccoonen, Jul 24, 2006 IP