Frerit / epiclock

Automatically exported from code.google.com/p/epiclock
0 stars 0 forks source link

Using 2 countdown timer on IE6 and 7 not working with script error but it works in Firefox #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I include 2 instance of the countdown timer in my page.
2. When the countdown ends in the first instance first, the second instance
just stops counting and i got a js error. If the second instance stop
first, the countdown will still work on the first one.

What is the expected output? What do you see instead?
When i use the script debugger on visual studio to debug the error, it is
failing in (this.data("epiClock").render()) of the following line:

case EC_RUN:if(!a){b();a=setInterval(b,h)}e=j;break}return this};function
b(){c.each(d,function(h){this.data("epiClock").render()})}

What version of the product are you using? On what operating system?
version 2.1.2 on IE6

Please provide any additional information below.
Here is my code for testing :

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=encoding">
<title>Test Countdown Clock</title>
    <script type="text/javascript" src="script/jquery-1.3.2.min.js"></script> 
    <script type="text/javascript" src="script/jquery.epiclock.min.js">
    </script> 
    <script type="text/javascript"> 

        // Once the dom loads...     
        jQuery(function(){    
            var start_dt = document.getElementById("dt").value; 
            var start_dt2 = document.getElementById("dt2").value; 

            jQuery('#clock') 
                .epiclock({mode: EC_COUNTDOWN, target: start_dt, onTimer:
function(){ 
                    changeText('clock', 'The sales is here!');}
                });

            jQuery('#clock2') 
                .epiclock({mode: EC_COUNTDOWN, target: start_dt2, onTimer:
function(){ 
                    changeText('clock2', 'The sales is here!');}
                });
        });

        jQuery.epiclock(EC_RUN);

        function changeText(elid, eltxt)
        {
            document.getElementById(elid).innerHTML = eltxt;    
        }
        function showHid()
        {
            alert(document.getElementById("dt").value);
        }
    </script>
</head>
    <body>
        <?php 
        $time_now = 'November 2, 2009 2:24:0';
        $time_now2 = 'November 2, 2009 2:29:60';
        ?>
        <span id="clock" name="clock"></span>
        <br/>
        <span id="clock2" name="clock2"></span><br/>
        <input id="dt" name="dt" type="hidden" value="<?php echo($time_now); ?>" />
        <input id="dt2" name="dt2" type="hidden" value="<?php echo($time_now2);
?>" />
    </body>
</html>

Original issue reported on code.google.com by powered1...@gmail.com on 1 Nov 2009 at 6:56

GoogleCodeExporter commented 9 years ago
There's a webcast related somewhat to this problem linked on the mainscreen of 
the page. Take a look at that 
and see if it provides any help?

Original comment by gars...@gmail.com on 10 Dec 2009 at 4:12

GoogleCodeExporter commented 9 years ago
Should be fixed by the new release.

Original comment by gars...@gmail.com on 24 May 2010 at 10:53