Add Time and Date to website
Viewing forum thread.
Back to Technology chat.
Back to Forum List.
04:10 Sun 16 Nov 08 (GMT) [Link]
Why dont you add time and date to the website...
<html>
<HEAD>
<script type="text/javascript">
<!--
function sivamtime() {
now=new Date();
hour=now.getHours();
min=now.getMinutes();
sec=now.getSeconds();
if (min<=9) { min="0"+min; }
if (sec<=9) { sec="0"+sec; }
if (hour<10) { hour="0"+hour; }
document.hours.clock.value = hour;
document.minutes.clock.value = min;
document.seconds.clock.value = sec;
setTimeout("sivamtime()", 1000);
}
<html>
<HEAD>
<script type="text/javascript">
<!--
function sivamtime() {
now=new Date();
hour=now.getHours();
min=now.getMinutes();
sec=now.getSeconds();
if (min<=9) { min="0"+min; }
if (sec<=9) { sec="0"+sec; }
if (hour<10) { hour="0"+hour; }
document.hours.clock.value = hour;
document.minutes.clock.value = min;
document.seconds.clock.value = sec;
setTimeout("sivamtime()", 1000);
}
04:11 Sun 16 Nov 08 (GMT) [Link]
function sivamtime3() {
now5=new Date();
addH = document.addhours.addclock.value;
addM = document.addminutes.addclock.value;
addS = document.addseconds.addclock.value;
hour3 = parseInt(addH) + now5.getHours();
min3 = parseInt(addM) + now5.getMinutes();
sec3 = parseInt(addS) + now5.getSeconds();
if (sec3>=60) { sec3 = -(60 - sec3); min3 = parseInt(min3)+1; }
if (min3>=60) { min3 = -(60 - min3); hour3 = parseInt(hour3)+1; }
if (hour3>=24) { hour3 = -(24 - hour3); }
if (sec3<=9) { sec3="0"+sec3; }
if (min3<=9) { min3="0"+min3; }
if (hour3<=9) { hour3="0"+hour3; }
if ((addS>59) || (addM>59) || (addH>23)) { window.alert('Invalid Input!!'); return false; }
if ((addS.length > 2) || (addM.length > 2) || (addH.length > 2)) { window.alert('Invalid Input!!'); return false; }
if ((addS.indexOf('-') != -1) || (addM.indexOf('-') != -1) || (addH.indexOf('-') != -1)) { window.alert('Invalid Input!!'); return false; }
document.hours1.clock1.value = hour3;
document.minutes1.clock1.value = min3;
document.seconds1.clock1.value = sec3;
setTimeout("sivamtime3()", 1000);
}
-->
</script>
</HEAD>
<BODY onLoad="sivamtime()">
</noscript></div></xmp></style>
<style type="text/css">
<!--
.link {font:12px verdana; text-decoration:none; font-weight:bold; color:BLUE; }
A:hover { color:#349901; }
-->
</style>
now5=new Date();
addH = document.addhours.addclock.value;
addM = document.addminutes.addclock.value;
addS = document.addseconds.addclock.value;
hour3 = parseInt(addH) + now5.getHours();
min3 = parseInt(addM) + now5.getMinutes();
sec3 = parseInt(addS) + now5.getSeconds();
if (sec3>=60) { sec3 = -(60 - sec3); min3 = parseInt(min3)+1; }
if (min3>=60) { min3 = -(60 - min3); hour3 = parseInt(hour3)+1; }
if (hour3>=24) { hour3 = -(24 - hour3); }
if (sec3<=9) { sec3="0"+sec3; }
if (min3<=9) { min3="0"+min3; }
if (hour3<=9) { hour3="0"+hour3; }
if ((addS>59) || (addM>59) || (addH>23)) { window.alert('Invalid Input!!'); return false; }
if ((addS.length > 2) || (addM.length > 2) || (addH.length > 2)) { window.alert('Invalid Input!!'); return false; }
if ((addS.indexOf('-') != -1) || (addM.indexOf('-') != -1) || (addH.indexOf('-') != -1)) { window.alert('Invalid Input!!'); return false; }
document.hours1.clock1.value = hour3;
document.minutes1.clock1.value = min3;
document.seconds1.clock1.value = sec3;
setTimeout("sivamtime3()", 1000);
}
-->
</script>
</HEAD>
<BODY onLoad="sivamtime()">
</noscript></div></xmp></style>
<style type="text/css">
<!--
.link {font:12px verdana; text-decoration:none; font-weight:bold; color:BLUE; }
A:hover { color:#349901; }
-->
</style>
04:14 Sun 16 Nov 08 (GMT) [Link]
<center>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<table border="5" align="center" cellpadding="0" cellspacing="0" width="160" bgcolor="#cccccc">
<tr>
<td>
<table border="0" align="center" cellpadding="0" cellspacing="0" width="80">
<tr>
<td align="center" colspan="3"><br />
<font face="verdana, arial, helvetica, sans-serif" size="1">
Current Time:
</font>
/td>
</tr>
<tr>
<td>
<form name="hours">
<p><input type="text" size="2" name="clock" /></p>
</form>
</td>
<td>
<form name="minutes">
<p><input type="text" size="2" name="clock" /></p>
</form>
</td>
<td>
<form name="seconds">
<p><input type="text" size="2" name="clock" /></p>
</form>
</td>
</tr>
</table><br />
</tr>
</table>
</html>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<table border="5" align="center" cellpadding="0" cellspacing="0" width="160" bgcolor="#cccccc">
<tr>
<td>
<table border="0" align="center" cellpadding="0" cellspacing="0" width="80">
<tr>
<td align="center" colspan="3"><br />
<font face="verdana, arial, helvetica, sans-serif" size="1">
Current Time:
</font>
/td>
</tr>
<tr>
<td>
<form name="hours">
<p><input type="text" size="2" name="clock" /></p>
</form>
</td>
<td>
<form name="minutes">
<p><input type="text" size="2" name="clock" /></p>
</form>
</td>
<td>
<form name="seconds">
<p><input type="text" size="2" name="clock" /></p>
</form>
</td>
</tr>
</table><br />
</tr>
</table>
</html>
Deleted User
(IP Logged)
(IP Logged)
05:03 Sun 16 Nov 08 (GMT) [Link]
i agree with keoghz.
I have never seen a computer which does not have a clock on the screen.
I want to see improvements on the pool side of things - not tools to tell me what the time is!!
I have never seen a computer which does not have a clock on the screen.
I want to see improvements on the pool side of things - not tools to tell me what the time is!!
Deleted User
(IP Logged)
(IP Logged)
06:11 Sun 16 Nov 08 (GMT) [Link]
Lol for a start look at your post it has the date on it.
And good codes lol I might use them for my site
And good codes lol I might use them for my site
Deleted User
(IP Logged)
(IP Logged)
08:11 Sun 16 Nov 08 (GMT) [Link]
Put your mouse over the clock on the bottom right.
I hope this helps.
I hope this helps.
09:34 Mon 17 Nov 08 (GMT) [Link]
I know it has the date but it doesnt matter that is what it is meant to be because without that bit of code then it will not come up with the time. And i created it myself...
Deleted User
(IP Logged)
(IP Logged)
11:54 Mon 17 Nov 08 (GMT) [Link]
Good work..
Maybe a countdown untill next tourny every hour would be good like 1 Minute 55 seconds untill the 9 ball...
You know what I mean lol.
Maybe a countdown untill next tourny every hour would be good like 1 Minute 55 seconds untill the 9 ball...
You know what I mean lol.
Deleted User
(IP Logged)
(IP Logged)
15:03 Mon 17 Nov 08 (GMT) [Link]
yeah...if you are in the chat room any any non-tournament room, then there could be a countdown to the start of the next tournament.
and maybe if you are in a tournament room, a countdown (or count up could work) for how long the game has left before a double DQ.
those kinds of clocks would help the game!!
and maybe if you are in a tournament room, a countdown (or count up could work) for how long the game has left before a double DQ.
those kinds of clocks would help the game!!
Deleted User
(IP Logged)
(IP Logged)
15:15 Mon 17 Nov 08 (GMT) [Link]
Yeah Probaly the best Idea I have had in a while lol.
09:46 Tue 18 Nov 08 (GMT) [Link]
This is that countdown timer you wanted hope it helps
09:49 Tue 18 Nov 08 (GMT) [Link]
<html>
<head>
<title>Funkypool Countdown timer </title>
<script language="javascript" type="text/javascript">
today = new Date();
todayEpoch = today.getTime();
target = new Date("18 November, 2008");
targetEpoch = target.getTime();
daysLeft = Math.floor(((targetEpoch - todayEpoch) / (60*60*24)) / 1000);
</script>
</head>
<body>
<h1>DoD inspection in
<script>document.write(daysLeft);</script>
days. Are you ready?
</h1>
</body>
<head>
<title>Funkypool Countdown timer </title>
<script language="javascript" type="text/javascript">
today = new Date();
todayEpoch = today.getTime();
target = new Date("18 November, 2008");
targetEpoch = target.getTime();
daysLeft = Math.floor(((targetEpoch - todayEpoch) / (60*60*24)) / 1000);
</script>
</head>
<body>
<h1>DoD inspection in
<script>document.write(daysLeft);</script>
days. Are you ready?
</h1>
</body>
13:27 Tue 18 Nov 08 (GMT) [Link]
You can't specify a date, it would just need to be a basic countdown of 60 minutes. But then again, you already have the clock doing that and if you're in game you get the tourney reminders.
Plenty of date, time and timer scripts here to modify and play with : http://javascript.internet.com/time-date/
(Moved to computer and Internet since it's become a scripting thread more than a query!)
Plenty of date, time and timer scripts here to modify and play with : http://javascript.internet.com/time-date/
(Moved to computer and Internet since it's become a scripting thread more than a query!)
Unable to post | |
---|---|
Reason: | You must log in before you can post |
Add Time and Date to website
Back to Top of this Page
Back to Technology chat.
Back to Forum List.