Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
jvandervort CreditAttribution: jvandervort commentedCan you try the latest dev release? 6.x-1.x-dev
Install it. Go to the admin settings and hit save.
Comment #2
truyenle CreditAttribution: truyenle commentedHi 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.
Comment #3
truyenle CreditAttribution: truyenle commentedAny clue how to fix this please help to share?
Comment #4
jvandervort CreditAttribution: jvandervort commentedIE8 appears to work for me. Can you post the full timer tag so I can test it?
Comment #5
truyenle CreditAttribution: truyenle commentedHere it is
won't work in IE8 because of the year > 2011
work in IE8
The only different between the above code is the year.
Thanks
Truyen
Comment #6
jvandervort CreditAttribution: jvandervort commentedI don't think you can count "up" to a future date.
Try "up" from a past date or "down" from a future date.
Comment #7
truyenle CreditAttribution: truyenle commentedI 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
Comment #8
truyenle CreditAttribution: truyenle commentedoh 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