Hi,

I have been trying the module for a while and now I have an issue when opening in IE. The countdown doesn't show up. Here is the error

Message: Object doesn't support this property or method
Line: 23
Char: 5
Code 0
URI: http://../files/jstimer/timer.js?c

at line 23 of timer.js I see

active_widgets[i].attach();

Does anyone know how to fix this?

Thanks

Comments

jvandervort’s picture

Can you try the latest dev release? 6.x-1.x-dev
Install it. Go to the admin settings and hit save.

truyenle’s picture

Hi Jvandervort,

I just try it the error is gone however the clock doesn't show but only the "-" sign.

I also see the root cause and could be a bug. If the year is greater than 2011 like 2012, 2013, etc, than the clock won't show up but only the "-" sign.
work:
2011-12-31T00:00:00-00:00
won't work:
2012-12-31T00:00:00-00:00

P/S: these are ok with other browsers but IE8 (still ok with IE7).

I did check the code when the year is different from the current year and see that (jst_timer.module)

if(now.getFullYear() == target.getFullYear()) {
dur.tot_months = Math.abs(target.getMonth() - now.getMonth());
dur.months = dur.tot_months;
} else {
dur.tot_months = 11 - now.getMonth();
dur.tot_months += target.getMonth() + 1;
dur.tot_months += (target.getFullYear() - now.getFullYear() - 1) * 12;
dur.months = dur.tot_months - (dur.years * 12);
}

The logic is totally right but I don't know why IE8 doesn't render it but only the "-" sign.

Thanks for your fast response.

truyenle’s picture

Any clue how to fix this please help to share?

jvandervort’s picture

IE8 appears to work for me. Can you post the full timer tag so I can test it?

truyenle’s picture

Here it is
won't work in IE8 because of the year > 2011

<div class="missionclock">
  <div class="countdown-gmt">Countdown to Challenge</div>
  <div class="countdown-flag GMT"></div>
  <div class="countdown-time-value">
     <span class="jst_timer">
      <span class="datetime" style="display: none;">2012-01-15T00:00:00-00:00</span>
      <span class="dir" style="display: none;">up</span>
      <span class="format_txt" style="display:none;">%sign%%days%:%hours%:%mins%:%secs%</span>
    </span>
  </div>
</div>

work in IE8

<div class="missionclock">
  <div class="countdown-gmt">Countdown to Challenge</div>
  <div class="countdown-flag GMT"></div>
  <div class="countdown-time-value">
     <span class="jst_timer">
      <span class="datetime" style="display: none;">2011-01-15T00:00:00-00:00</span>
      <span class="dir" style="display: none;">up</span>
      <span class="format_txt" style="display:none;">%sign%%days%:%hours%:%mins%:%secs%</span>
    </span>
  </div>
</div>

The only different between the above code is the year.

Thanks
Truyen

jvandervort’s picture

I don't think you can count "up" to a future date.
Try "up" from a past date or "down" from a future date.

truyenle’s picture

I try both and the results are the same in IE8. I mean same code above, just change it from "up" to "down" still doesn't work in IE8 but others.
Thanks

truyenle’s picture

Status: Active » Closed (works as designed)

oh oh! it is working under IE8 jvandervort. It's the css that apply to div that hide it under IE8 but not in IE7 and others.

Thanks for help.

Truyen