SMF For Free Support Forum
Signup For Free Forum
September 06, 2008, 12:18:41 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to SMF For Free. The best free SMF Host
 
   Home   Help Search Arcade Gallery Login Register  

Pages: [1]
  Print  
Author Topic: Clock for ur forum  (Read 2467 times)
0 Members and 1 Guest are viewing this topic.
DDS
SMF For Free Full Member
*
Offline Offline

Posts: 134


View Profile
« on: March 29, 2008, 07:56:59 pm »

Forum Url: http://IPlay.smfforfree3.com
Code:
<script language="JavaScript">

<!--
var clockID = 0;

function UpdateClock() {
   if(clockID) {
      clearTimeout(clockID);
      clockID  = 0;
   }

   var tDate = new Date();

   document.theClock.theTime.value = ""
                                   + tDate.getHours() + ":"
                                   + tDate.getMinutes() + ":"
                                   + tDate.getSeconds();
   
   clockID = setTimeout("UpdateClock()", 1000);
}
function StartClock() {
   clockID = setTimeout("UpdateClock()", 500);
}

function KillClock() {
   if(clockID) {
      clearTimeout(clockID);
      clockID  = 0;
   }
}

//-->

</script>
<body onload="StartClock()" onunload="KillClock()">
<center><form name="theClock">
<input type=text name="theTime" size=8>
<form></center>
« Last Edit: March 30, 2008, 09:05:19 am by DDS » Logged
LaundryLady
Global Moderator
*
Offline Offline

Posts: 3038



View Profile WWW
« Reply #1 on: March 29, 2008, 08:14:30 pm »

Have you tested this on your site? Does it work with all browsers?  FF, Opera IE 6 and 7, Netscape, K-Meleon?
Logged

DDS
SMF For Free Full Member
*
Offline Offline

Posts: 134


View Profile
« Reply #2 on: March 29, 2008, 10:28:14 pm »

yes i tested
Logged
SharpShot
SMF For Free Hero
*
Offline Offline

Posts: 833


Aetus.net is my home


View Profile WWW
« Reply #3 on: March 29, 2008, 11:03:44 pm »

I have made a site preview for this...visit http://clockcode.smfforfree3.com/index.php

Look at the very top!
Logged





LaundryLady
Global Moderator
*
Offline Offline

Posts: 3038



View Profile WWW
« Reply #4 on: March 30, 2008, 07:28:09 am »

Thanks, Bunnypal for being the guinea pig.  I don't use codes unless I know they have been tested, especially if I am not familiar with the maker.
Logged

SharpShot
SMF For Free Hero
*
Offline Offline

Posts: 833


Aetus.net is my home


View Profile WWW
« Reply #5 on: March 30, 2008, 08:52:32 am »

No problem!

DDS might I suggest somethign? Well I don't know if I am able to change  but it in military time, though i'm pretty sure most people can read it; its just that its...different.
Logged





DDS
SMF For Free Full Member
*
Offline Offline

Posts: 134


View Profile
« Reply #6 on: March 30, 2008, 09:08:51 am »

ill make 1 of them Bunny if im not busy ok?
Logged
Vice
SMF For Free Full Member
*
Offline Offline

Posts: 136


Photoshop Userbars :d


View Profile WWW
« Reply #7 on: April 27, 2008, 08:11:08 am »

Can you mabye put a background or something loooks really plain and smallish but gj for this its ok but room for improvement i shouldn't really be critisizing because i can't code well myself
Logged

sergeim
SMF For Free Full Member
*
Offline Offline

Posts: 177



View Profile WWW
« Reply #8 on: April 28, 2008, 02:38:16 am »

it do not work on firefox
Logged

LaundryLady
Global Moderator
*
Offline Offline

Posts: 3038



View Profile WWW
« Reply #9 on: April 28, 2008, 08:59:54 am »

yes, it does work on FF.  I just tested it.
« Last Edit: April 28, 2008, 09:03:38 am by LaundryLady » Logged

Kalphiter
SMF For Free Full Member
*
Offline Offline

Posts: 119



View Profile
« Reply #10 on: May 12, 2008, 05:34:57 pm »

Forum Url: http://IPlay.smfforfree3.com
Code:
<script language="JavaScript">

<!--
var clockID = 0;

function UpdateClock() {
   if(clockID) {
      clearTimeout(clockID);
      clockID  = 0;
   }

   var tDate = new Date();

   document.theClock.theTime.value = ""
                                   + tDate.getHours() + ":"
                                   + tDate.getMinutes() + ":"
                                   + tDate.getSeconds();
   
   clockID = setTimeout("UpdateClock()", 1000);
}
function StartClock() {
   clockID = setTimeout("UpdateClock()", 500);
}

function KillClock() {
   if(clockID) {
      clearTimeout(clockID);
      clockID  = 0;
   }
}

//-->

</script>
<body onload="StartClock()" onunload="KillClock()">
<center><form name="theClock">
<input type=text name="theTime" size=8>
<form></center>

It would be easier just for a simple clock, that would work by refreshing the page, which also tells the date. The one I have is hard to beat because it's so easy!
Code:
<b>Date:</b><SCRIPT LANGUAGE="JavaScript">
<!--
Stamp = new Date();
document.write('' + (Stamp.getMonth() + 1) +"/"+Stamp.getDate()+ "/"+Stamp.getYear() + ' <br> ');
var Hours;
var Mins;
var Time;
Hours = Stamp.getHours();
if (Hours >= 12) {
Time = " P.M.";
}
else {
Time = " A.M.";
}

if (Hours > 12) {
Hours -= 12;
}

if (Hours == 0) {
Hours = 12;
}

Mins = Stamp.getMinutes();

if (Mins < 10) {
Mins = "0" + Mins;
}

document.write('<B>Time:</b> ' + Hours + ":" + Mins + Time + '');

//-->
</SCRIPT>

It tells AM/PM too. You should provide images for this!
« Last Edit: May 13, 2008, 04:50:59 pm by Kalphite » Logged
LaundryLady
Global Moderator
*
Offline Offline

Posts: 3038



View Profile WWW
« Reply #11 on: May 12, 2008, 06:16:01 pm »

If you are posting it, you provide the images.
Logged

Kalphiter
SMF For Free Full Member
*
Offline Offline

Posts: 119



View Profile
« Reply #12 on: May 13, 2008, 04:47:29 pm »

If you are posting it, you provide the images.
Lol I'm stupid Smiley
Logged
simply sibyl
Global Moderator
*
Offline Offline

Posts: 8027


I am not a dude!


View Profile WWW
« Reply #13 on: May 13, 2008, 05:06:11 pm »

If you are posting it, you provide the images.
Lol I'm stupid Smiley

hi stupid..im nuts.. nice to meet you
Logged

Kalphiter
SMF For Free Full Member
*
Offline Offline

Posts: 119



View Profile
« Reply #14 on: May 15, 2008, 08:11:00 pm »

If you are posting it, you provide the images.
Lol I'm stupid Smiley

hi stupid..im nuts.. nice to meet you
Stupid.. nuts... some flour.. cake!
Logged


Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC
ServerBeach Coupon
Page created in 0.628 seconds with 18 queries.