JS countdown clock not working in IE or IOS


I've got some code part off of the web I m using on my web-site it is a JS clock, it work fine in firefox and thats it, I wish to catch it working in at least IE.
here is 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 Minute, S Second.";
FinishMessage = "It is finally here ";and the JS: *
Author: Robert Hashemian
http: www.hashemian.com
You can use that code in some manner such long as the author's
name, Web address and that disclaimer is kept intact.
********************************************************
Utilisation Sample:TargetDate = "12 31 2020 5:00 AM";
BackColor = "palegreen";
ForeColor = "navy";
CountActive = true;
CountStepper = -1;
LeadingZero = true;
DisplayFormat = " D Days, H Hours, M Minute, S Second.";
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 Minute, S Second.";
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 Minute, NaN Second
if it cannot be done I assume it will be better to use another script
That topic 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 webform. The first script is a countdown timer this removes the "add to cart" button when the countdown timer reaches 0 (font is white on my production page such it doesn't view up). The seconds script is a fancy

VIEWS ON THIS POST

22

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

to show image by date - countdown images


how would i rewrite the code part underneath such rather 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 require the code to compile on a categorical date.
javascript or ph

VIEWS ON THIS POST

30

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

Require 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 Minute, S Second.";
FinishMessage = "C

VIEWS ON THIS POST

31

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

Java script countdown timer Nan Advise plz!


I realy require some advise i pass the end_time of the script using ajax from a Relational db then calculate the remaining time calculating the dif from the current time each seconds. It work for the first second then I catch NaN error + the timer then

VIEWS ON THIS POST

52

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

Newcomer to java scripts! Simplistic countdown timer needed plz



As I am newcomer to java scripts, I usually crack thing with trial and error.
What I require is a very simplistic java script for a count down timer, after searching here I found that:
----------------------
Code part:var form = "htt

VIEWS ON THIS POST

22

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

Resolved Simplistic countdown timer


Ok I have been struggling for the last week to catch my head around that JS thing to Create myself a countdown timer. And after much search keywords in whatever search engine I still could not find any better results which could meet my needs. I r

VIEWS ON THIS POST

26

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

countdown timer and e-mail send

i am newcomer to jquery
what i a wish to do is a countdown timer and to send e-mail
1 - starts timer 15 sec
2 - when the timer starts catch raw data from I/P fields , send e-mail with the I/P fields
3 - view the timer in

VIEWS ON THIS POST

35

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

JS Many age clocks/counters


I am looking for a many countup or age timer with in a html form (using JS). I wish to display underneath each child picture the age clock counter of the child. I do not understand JS well (I recognize some code part) and understand<

VIEWS ON THIS POST

21

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

countdown advise

All right I am newcomer to that forum and also newcomer to JS. I am taking a class in JS and the homework is to Create that form this does a countdown for miscellaneous holidays. I have tried and tried but can not catch
VIEWS ON THIS POST

31

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

Updating clock not working

Such I have a JS function this uses the servers time to set the initiated time (with ASP.Net) and thats working fine but really arranging the clock isn't working and I've been staring at it for hours struggling to solve out whats incorrect and
VIEWS ON THIS POST

31

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

JS countdown trouble

k i make clear the trouble from the basic
this fills a drop down futher down the form 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=n

VIEWS ON THIS POST

19

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

Countdown clock using array

I have the JS to Create a countdown clock but I wish to use Arrays to view many countdown clocks for dissimilar time.
for illustration:
var clockArray = new Array(9);
clockArray[0] = "NO IDEA WHAT TO PUT HERE that is where i require<

VIEWS ON THIS POST

32

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

Real time countdown timer

Hello Someone can advise me I wish to make realtime countdown timer like on Zynga Game test Mafia. I just attempt with that code part but if I refresh browser, the time loop again.
Thanks beforeTimer Test
var _arrCountDownContainers = new Array(

VIEWS ON THIS POST

33

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

Event countdown

solved...
That topic has been updated by taraRaye: 15 February 2010 - 01:57 PM

VIEWS ON THIS POST

19

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

Timer countdown from date in a Relational db

This is just a query and wish to understand how i would go about performing a java countdown this would countdown from a date in my Relational db and when it gets to zero it would disable the submit button. I currently have a java countdown working however this is
VIEWS ON THIS POST

37

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

CSS3 Analog clock - No image used

I have seen much beauteous clocks using images and and canvas and flash. So I thought of developing one with pure HTMLCSS3 and JS, no images at all. That clock can be completely design using CSS. A brief description of JS used:- 'AnalogClock' is the name of the cla
VIEWS ON THIS POST

79

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

jDigiclock make it catch locale dynamically?

Hi I've been playing around with the jDigiclock weather+time script from http: www.radoslavdimov.com jquery-plugins jquery-plugin-digiclock the only trouble with that awesome script is this it catch the address of the user from the static I/P direct
VIEWS ON THIS POST

164

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

conflicting JS - clock/time and random background

All Im struggling to make a individual home form this both shows the time and a random background each refresh using JS. so far i have managed to catch either one or the other to work but not both.
i wish to understand if Someone

VIEWS ON THIS POST

29

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

JS clock

That script displays the current time in your 's browser. You can pick the 12-hours format or the 24-hours format.
VIEWS ON THIS POST

18

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

Analog clock

I have a piece of Javascript this execute a analog clock I wish to alter such it loads when the form loads. Instantly it waits for a left click event to start. I understand what code part to alter I just donot unders
VIEWS ON THIS POST

20

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

  • T = 0.02

  • Copyright 2012 © SolveThisError.com. All rights reserved. Terms of use  |  Privacy Policy