Javascript Countdown

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mageswar005
    New Member
    • Mar 2008
    • 72

    Javascript Countdown

    hi,
    I need a javascript countdown timer to my website, I have already the countdown timer but its have some problem.

    Note: 1) If i choose the tools/internet option in my browser means , at that time countdown cannot be stop.

    2) If i refresh the page means the countdown should comes from begining time.

    this is for Browser session time out countdown timer.

    Regards,
    M.Mageswaran
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Post what you've tried so far.

    Comment

    • RamananKalirajan
      Contributor
      • Mar 2008
      • 608

      #3
      Hi Mageshwaran, this is a code which satisfies one fo ur requirement (2). But I can't satisfy ur requirement 1.

      [HTML]<html>
      <head>
      <script type="text/javascript">
      var x=0;
      function doThis()
      {
      x=x+1;
      document.getEle mentById('myDiv ').innerHTML=x;
      setTimeout('doT his()',1000);
      }
      </script>
      </head>
      <body onload="doThis( )">
      <h2>CountDown </h2>
      <h3><Div id="myDiv"></Div></h3>
      </body>
      </html>[/HTML]
      Regards
      Ramanan Kalirajan

      Comment

      • mageswar005
        New Member
        • Mar 2008
        • 72

        #4
        Originally posted by RamananKaliraja n
        Hi Mageshwaran, this is a code which satisfies one fo ur requirement (2). But I can't satisfy ur requirement 1.

        [HTML]<html>
        <head>
        <script type="text/javascript">
        var x=0;
        function doThis()
        {
        x=x+1;
        document.getEle mentById('myDiv ').innerHTML=x;
        setTimeout('doT his()',1000);
        }
        </script>
        </head>
        <body onload="doThis( )">
        <h2>CountDown </h2>
        <h3><Div id="myDiv"></Div></h3>
        </body>
        </html>[/HTML]
        Regards
        Ramanan Kalirajan
        still i didnt got result

        Comment

        • acoder
          Recognized Expert MVP
          • Nov 2006
          • 16032

          #5
          As I said in the first reply, post your code.

          Comment

          • RamananKalirajan
            Contributor
            • Mar 2008
            • 608

            #6
            Originally posted by mageswar005
            still i didnt got result
            The code what I had given to u is working fine for ur requirement no 2. i.e. If i refresh the page the count down starts from the begining. Please post ur code what u have tried so far. What is the IE version u are using.

            Regards
            Ramanan Kalirajan

            Comment

            Working...