Our FamilyForum

FamilyForum Documentation & Help => FamilyForum Features & Guidelines => Code & Stuff => Topic started by: Ken on December 04, 2017, 07:47:58 PM

Title: [code] Christmas Countdown Block
Post by: Ken on December 04, 2017, 07:47:58 PM
Got a coding issue with the "Christmas Countdown" block. This code has worked in years past, but not this time... It shows the text, but not the countdown clock.

Ant ideas on the code mix up?

Quote
<div align="center"><span id="cntdwn" style="background-color:palegreen; color:navy">Lets Count Down to Christmas 2017 Everyone!!!</span>&nbsp;

</div>
<div align="center"><span id="cntdwn" style="background-color:palegreen; color:navy"></span>

</div>
<script language="JavaScript">TargetDate = "12/25/2017 00:01 AM";
BackColor = "palegreen";
ForeColor = "navy";
CountActive = true;
CountStepper = -1;
LeadingZero = true;
DisplayFormat = "%%D%% Days, %%H%% Hours, %%M%% Minutes, %%S%% Seconds.";
FinishMessage = "Merry Christmas 2017 Everyone!!!";
</script>
<script language="JavaScript" src="http://scripts.hashemian.com/js/countdown.js"></script><span id="cntdwn" style="background-color:palegreen; color:navy"></span><span id="cntdwn" style="background-color:palegreen; color:navy"></span><span id="cntdwn" style="background-color:palegreen; color:navy"></span><span id="cntdwn" style="background-color:palegreen; color:navy"></span><span id="cntdwn" style="background-color:palegreen; color:navy"></span><span id="cntdwn" style="background-color:palegreen; color:navy"></span><span id="cntdwn" style="background-color:palegreen; color:navy"></span><span id="cntdwn" style="background-color:palegreen; color:navy"></span><span id="cntdwn" style="background-color:palegreen; color:navy"></span><span id="cntdwn" style="background-color:palegreen; color:navy"></span><span id="cntdwn" style="background-color:palegreen; color:navy"></span><span id="cntdwn" style="background-color:palegreen; color:navy"></span><span id="cntdwn" style="background-color:palegreen; color:navy"></span><span id="cntdwn" style="background-color:palegreen; color:navy"></span><span id="cntdwn" style="background-color:palegreen; color:navy"></span><span id="cntdwn" style="background-color:palegreen; color:navy"></span><span id="cntdwn" style="background-color:palegreen; color:navy"></span><span id="cntdwn" style="background-color:palegreen; color:navy"></span>
Title: Re: [code] Christmas Countdown Block
Post by: Skhilled on December 05, 2017, 09:03:53 AM
I can only assume that there's a TP or SMF issue due to upgrades. I just checked and it does work here:

https://www.hashemian.com/tools/javascript-countdown.htm
Title: Re: [code] Christmas Countdown Block
Post by: Ken on December 05, 2017, 11:14:05 AM
That worked! Thanks Steve!  :thumbup:
Title: Re: [code] Christmas Countdown Block
Post by: Skhilled on December 05, 2017, 11:20:07 AM
So, the code was different, I guess?
Title: Re: [code] Christmas Countdown Block
Post by: Ken on December 05, 2017, 11:26:27 AM
Not really sure if it was different... I didn't compare the two, just made a new block using the code that you linked to.
Title: Re: [code] Christmas Countdown Block
Post by: Skhilled on December 05, 2017, 11:30:28 AM
I would have played with it myself but almost burn't my dinner I was making while searching and gave up for the moment. LOL
Title: Re: [code] Christmas Countdown Block
Post by: Ken on December 05, 2017, 12:21:12 PM
 :opps:
Sorry about your dinner.  :-[
Title: Re: [code] Christmas Countdown Block
Post by: Mick on December 05, 2017, 04:42:11 PM
Not sure why it would stop working tbh.  I try it out.

Edit: Tried it and it works fine on my test site. TP 1.3R and SMF 2.0.15
Title: Re: [code] Christmas Countdown Block
Post by: Ken on December 05, 2017, 06:45:34 PM
Thanks for checking the code Mick.  :thumbup:

Strange that it won't work here.