The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Js countdown timer

4 posters

Go down

Js countdown timer Empty Js countdown timer

Post by Decibel March 26th 2008, 2:26 pm

Little realtime snippet you can add to portal(or whereever). Just need to adjust the date and message format.(as well as foreground and background colors, initially.) As an example I use mine as a holiday countdown timer.
There are only 05 Days, 14 Hours, 38 Minutes, 29 Seconds until April Fools Day!!
I've bolded the areas that need changing, pretty straight forward script, and an eyecatcher.
Code:
<script language="JavaScript">TargetDate = "[b]04/01/2008 00:00 AM[/b]";BackColor = "#[b]ecf7ee[/b]";ForeColor = "#[b]536482[/b]";CountActive = true;CountStepper = -1;LeadingZero = true;DisplayFormat = "There are only %%D%% Days, %%H%% Hours, %%M%% Minutes, %%S%% Seconds until [b]April Fools Day!![/b]";FinishMessage = "Its [b]April Fools Day Today!![/b]";</script><script language="JavaScript" src="http://scripts.hashemian.com/js/countdown.js"></script>
Any problem, post here.
Edit: I guess tags dont work in code, so whatever is between the [b ] and [/b ] tags
Decibel
Decibel
Forumember

Male Posts : 201
Reputation : 10
Language : english
Location : Canada

http://decibels.forumsmusic.com

Back to top Go down

Js countdown timer Empty Re: Js countdown timer

Post by WWGG March 26th 2008, 3:56 pm

Hey that's a great bit of code! I use one similar but that's a lot easier to read and edit when needs be!

Thanks!

Very Happy
WWGG
WWGG
Forumember

Male Posts : 109
Reputation : 0
Language : English
Location : Sunderland, UK

http://wwgg.forumandco.com

Back to top Go down

Js countdown timer Empty Re: Js countdown timer

Post by iceQ March 31st 2008, 4:17 am

hello ,, I tryed as you explain example->( i change the date on 27/04/08 & hour on 00:01 am) but ...
i see only this ->There are only NaN Days, NaN Hours, NaN Minutes, NaN Seconds until .... Day!!
the full editing code below:
Code:
<script language="JavaScript">TargetDate = "[b]27/04/2008 00:01 AM[/b]";BackColor = "#[b]ecf7ee[/b]";ForeColor = "#[b]536482[/b]";CountActive = true;CountStepper = -1;LeadingZero = true;DisplayFormat = "There are only %%D%% Days, %%H%% Hours, %%M%% Minutes, %%S%% Seconds until [b]...... Day!![/b]";FinishMessage = "Its [b]April Fools Day Today!![/b]";</script><script language="JavaScript" src="http://scripts.hashemian.com/js/countdown.js"></script>
where iam wrong ???
thanks
iceQ
iceQ
Forumember

Male Posts : 60
Reputation : 0
Language : Hellas
Location : everyWhere on Earth

http://www.allsat4.buy-talk.com

Back to top Go down

Js countdown timer Empty Re: Js countdown timer

Post by Decibel March 31st 2008, 4:25 am

Take the bold tags out
Code:
<script language="JavaScript">TargetDate = "27/04/2008 00:01 AM";BackColor = "#ecf7ee";ForeColor = "#536482";CountActive = true;CountStepper = -1;LeadingZero = true;DisplayFormat = "There are only %%D%% Days, %%H%% Hours, %%M%% Minutes, %%S%% Seconds until ...... Day!!";FinishMessage = "Its April Fools Day Today!!";</script><script language="JavaScript" src="http://scripts.hashemian.com/js/countdown.js"></script>
Decibel
Decibel
Forumember

Male Posts : 201
Reputation : 10
Language : english
Location : Canada

http://decibels.forumsmusic.com

Back to top Go down

Js countdown timer Empty Re: Js countdown timer

Post by iceQ March 31st 2008, 5:24 pm

thanks @Decibel bro , edited & works fine
have a nice good time Very Happy
Hello
iceQ
iceQ
Forumember

Male Posts : 60
Reputation : 0
Language : Hellas
Location : everyWhere on Earth

http://www.allsat4.buy-talk.com

Back to top Go down

Js countdown timer Empty Re: Js countdown timer

Post by jacob-rice June 20th 2008, 1:16 am

how can i make the numbers not bold?
jacob-rice
jacob-rice
Forumember

Posts : 59
Reputation : 0
Language : english

http://gunzwater.tk

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum