Go Back   Forums > Community Chatterbox > Tech Corner > Programming
Memberlist Forum Rules Today's Posts
Search Forums:
Click here to use Advanced Search

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 15-07-2009, 01:46 PM   #1
The Fifth Horseman
FUTURE SCIENCE BASTARD
 
The Fifth Horseman's Avatar


 
Join Date: Oct 2004
Location: Opole, Poland
Posts: 14,276
Default Something weird with JavaScript

This is the code:
HTML Code:
<title>
&nbsp
</title>
<SCRIPT LANGUAGE="JAVASCRIPT">
td = new Date();
BD = new Date("October 1, 2008");
ms = 24 * 60 * 60 * 1000 ;
tL = (BD.getTime() - td.getTime());
edL = tL / ms;
dL = Math.floor(edL);
ehL = (edL - dL)*24;
hL = Math.floor(ehL);
emL = (ehL - hL)*60;
mL = Math.floor(emL);
sL = Math.floor ((emL - mL)*60);
</script>
</head>
<BODY BGCOLOR=black TEXT=white>
<center>
<FONT FACE=Arial,Helvetica SIZE=10>
<script language="javascript">
if (self==parent)
{
document.write('<FONT SIZE=5><i><p>"Gantz."</p> <p>"Katastrophe."</p></i><BR><BR><BR></FONT>')
};
document.write("<B>"+dL+" d, "+hL+" hrs, "+mL+" min "+sL+" s</B>");
timerID = setTimeout("location.reload()",1000);
timerID = setTimeout("history.go(0)",1000);
</script>
</FONT>
</center>
</body>
</html>
The live page: http://gantz.katastrophe.w.interia.pl/details.html is showing the clock, the even it indicated has long since passed so it should be increasing it's count.
However, instead of doing that, the numbers decrease.
Where is the error in the script?
__________________

"God. Can't you people see I'm trying to commit a crime against science and nature here?"
-- Reed Richards
The Fifth Horseman is offline                         Send a private message to The Fifth Horseman
Reply With Quote
 


Similar Threads
Thread Thread Starter Forum Replies Last Post
OK this is weird... Mrazerty Trash Can 5 04-05-2008 02:11 AM
Javascript And Firefox Abi79 Tech Corner 3 09-04-2006 05:53 AM
Weird Halo Mod TheGiantMidgit Blah, blah, blah... 4 01-12-2005 02:38 AM
This Is Weird I Need Help malice Troubleshooting 4 21-11-2005 11:13 PM


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump
 


The current time is 08:35 AM (GMT)

 
Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.