Javascript countdown clock not working in IE or IOS


I have got some code snippet off of the web I am using on my web site it is a javascript clock, it works just fine in firefox and thats it, I want to receive it working in at least IE.
Here's the code:
TargetDate = "07 31 2012 11:00 AM GMT+0:00";
BackColor = "palepink";
ForeColor = "black";
CountActive = true;
CountStepper = -1;
LeadingZero = true;
DisplayFormat = " D Days, H Hours, M Minutes, S Seconds.";
FinishMessage = "It is finally here ";and the javascript: *
Author: Robert Hashemian
http: www.hashemian.com
U can use this code in any manner so long as the author's
name, Web address and this disclaimer is kept intact.
********************************************************
Utilization Sample:TargetDate = "12 31 2020 5:00 AM";
BackColor = "palegreen";
ForeColor = "navy";
CountActive = true;
CountStepper = -1;
LeadingZero = true;
DisplayFormat = " D Days, H Hours, M Minutes, S Seconds.";
FinishMessage = "It is finally here ";*
function calcage(secs, num1, num2) {
s = ((Math.floor(secs num1)) num2).toString();
if (LeadingZero && s.length " + s + "";
}
function CountBack(secs) {
if (secs ");
}
if (typeof(BackColor)=="undefined")
BackColor = "white";
if (typeof(ForeColor)=="undefined")
ForeColor= "black";
if (typeof(TargetDate)=="undefined")
TargetDate = "12 31 2020 5:00 AM";
if (typeof(DisplayFormat)=="undefined")
DisplayFormat = " D Days, H Hours, M Minutes, S Seconds.";
if (typeof(CountActive)=="undefined")
CountActive = true;
if (typeof(FinishMessage)=="undefined")
FinishMessage = "";
if (typeof(CountStepper) ="number")
CountStepper = -1;
if (typeof(LeadingZero)=="undefined")
LeadingZero = true;CountStepper = Math.ceil(CountStepper);
if (CountStepper == 0)
CountActive = false;
var SetTimeOutPeriod = (Math.abs(CountStepper)-1)*1000 + 990;
putspan(BackColor, ForeColor);
var dthen = new Date(TargetDate);
var dnow = new Date();
if(CountStepper>0)
ddiff = new Date(dnow-dthen);
else
ddiff = new Date(dthen-dnow);
gsecs = Math.floor(ddiff.valueOf() 1000);
CountBack(gsecs);all I get is:
NaN Days, NaN Hours, NaN Minutes, NaN Seconds
if it can not be done I think it will be best to use another script
This post has been updated by Addio569: 31 March 2011 - 06:42 AM

View Complete with Replies


RELATED TOPICS OF JavaScript PROGRAMMING LANGUAGE




loops for countdown timers


I have 2 countdown scripts for a shopping cart web page. The first script is a countdown timer that removes the "add to cart" button when the countdown timer reaches 0 (font is white on my production page so it does not display up). The second script is a fancy flash count

VIEWS ON THIS POST

9

Posted on:
Wednesday, October 17, 2012
View Replies !

show image by date - countdown images


how would i update the code snippet below so instead of today is day 16 of the month to an actual date eg Today is 10 11 2011 (dd mm yyyy or mm dd yyyy compatible). I want the code to run on a specific date.
javascript or php versions so welcome
THANKS<

VIEWS ON THIS POST

5

Posted on:
Wednesday, October 17, 2012
View Replies !

Want countdown timer to reset daily


Using the following script:
TargetDate = "01 22 2010 7:50 AM UTC-0500";
BackColor = "palegreen";
ForeColor = "navy";
CountActive = true;
CountStepper = -1;
LeadingZero = true;
DisplayFormat = " D Days H Hours, M Minutes, S Seconds.";
FinishMessage = "Call In Now

VIEWS ON THIS POST

5

Posted on:
Saturday, October 20, 2012
View Replies !

Java script countdown timer Nan Assist please!


I realy want some assist i pass the end_time of the script using ajax from a db then calculate the remaining time calculating the dif from the current time each second. It works for the first second then I receive NaN error message + the timer then refreshes b

VIEWS ON THIS POST

8

Posted on:
Saturday, October 20, 2012
View Replies !

Newbie to java scripts! Easy countdown timer needed pls



As I'm newbie to java scripts, I usually solve thing with trial and error message.
What I want is a so easy java script for a count down timer, after searching here I found this:
----------------------
Code snippet:var page = "http:

VIEWS ON THIS POST

7

Posted on:
Saturday, October 20, 2012
View Replies !

Resolved Easy countdown timer


Ok I've been attempting for the last week to receive my head around this javascript thing to generate myself a countdown timer. And after several search keywords in whatever search engine I still could not find any good results that could meet my

VIEWS ON THIS POST

6

Posted on:
Saturday, October 20, 2012
View Replies !

countdown timer and E-mail send

I'm newbie to jquery
what i a need to do is a countdown timer and to send E-mail
1 - starts timer 15 sec
2 - when the timer starts receive data from input fields , send E-mail with the input fields
3 - display the timer in a specific

VIEWS ON THIS POST

5

Posted on:
Saturday, November 10, 2012
View Replies !

Javascript More than one age clocks/counters


I am looking for a more than one countup or age timer within a html page (using javascript). I need to display given below each child picture the age clock counter of the child. I do not know javascript well (I recognize some code snippet) and know a little of html. I

VIEWS ON THIS POST

3

Posted on:
Saturday, November 10, 2012
View Replies !

countdown assist

Okay I'm newbie to this forum and also newbie to Javascript. I'm taking a class in Javascript and the homework is to generate this page that does a countdown for different holidays. I've tried and tried but can't receive this thing to wo
VIEWS ON THIS POST

9

Posted on:
Saturday, November 10, 2012
View Replies !

Updating clock not working

So I've a Javascript function that uses the servers time to set the initiated time (with ASP.Net) and thats working fine but actually displaying the clock is not working and I have been staring at it for hours attempting to find out What is wrong and I just
VIEWS ON THIS POST

3

Posted on:
Sunday, November 11, 2012
View Replies !

javascript countdown difficulty

k i define the difficulty from the beginning
this fills a drop down futher down the page with the dates. (works)
var monthtext=['01''02','03','04','05','06','07','08','09','10','11','12'];
function populatedropdown(dayfield, monthfield, yearfield){
var today=new Date()

VIEWS ON THIS POST

7

Posted on:
Monday, November 12, 2012
View Replies !

Countdown clock using array

I have the javascript to generate a countdown clock but i want to use Arrays to display more than one countdown clocks for various time.
for example:
var clockArray = new Array(9);
clockArray[0] = "NO Solution WHAT TO PUT HERE this is where i want

VIEWS ON THIS POST

7

Posted on:
Monday, November 12, 2012
View Replies !

Real time countdown timer

Hello anybody can assist me I need to make realtime countdown timer like on Zynga Game examination Mafia. I just try By this code snippet but if I refresh browser, the time loop again.
Thanks beforeTimer Test
var _arrCountDownContainers = new Array();<

VIEWS ON THIS POST

7

Posted on:
Monday, November 12, 2012
View Replies !

Event countdown

solved...
This post has been updated by taraRaye: 15 February 2010 - 01:57 PM

VIEWS ON THIS POST

5

Posted on:
Monday, November 12, 2012
View Replies !

Timer countdown from date in a db

This is just a query and wish to know how i'd go about generating a java countdown that would countdown from a date in my db and when it gets to zero it would disable the submit button. I recently have a java countdown working however this is not counting d
VIEWS ON THIS POST

8

Posted on:
Friday, November 16, 2012
View Replies !

CSS3 Analog clock - No image used

I've seen several attractive clocks using images and and canvas and flash. So I thought of developing one with pure HTMLCSS3 and javascript, no images at all. This clock can be entirely design using CSS. A brief description of Javascript used:- 'AnalogClock' is the name o
VIEWS ON THIS POST

11

Posted on:
Friday, November 16, 2012
View Replies !

jDigiclock make it receive locale dynamically?

Hey I have been playing around with the jDigiclock weather+time script from http: www.radoslavdimov.com jquery-plugins jquery-plugin-digiclock the only difficulty By this awesome script is that it receive the location of the user from the static input directly from the
VIEWS ON THIS POST

19

Posted on:
Monday, November 19, 2012
View Replies !

conflicting javascript - clock/time and random background

everyone Im attempting to make a private home page that both displays the time and a random background each refresh using javascript. so far I've managed to receive either one or the other to work but not both.
I wish to know if anybody cou

VIEWS ON THIS POST

7

Posted on:
Monday, November 19, 2012
View Replies !

javascript clock

This script shows the current time in ur browser. U can select the 12-hours format or the 24-hours format.
VIEWS ON THIS POST

7

Posted on:
Monday, November 19, 2012
View Replies !

Analog clock

I have a piece of JS that runs a analog clock I need to alter so it loads when the page loads. Right now it waits for a click event to start. I know what code snippet to alter I just do not know what to alter it to. I am positive the startClock function is w
VIEWS ON THIS POST

4

Posted on:
Monday, November 19, 2012
View Replies !