Web hosting & free domain name registration for small business web sites. It's easy to be a dot-com (ez2ba.com)  United States Website Hosting  Canadian Website Hosting  Australian Website Hosting  United Kingdom Website Hosting  European Website Hosting
"Passionately Committed to
Excellent Customer Service and Support."
 
 

SERVICES
WEB HOSTING
Hosting Prices
Add-Ons
Scripts
Our Network
Get Started
Check Domain
Free Domain
Register Domain
TheSiteXpress!
Templates
Design Resources
WebSite Builder
Development
Ecomm Add-On
Apply Online
Website Marketing
Free $50 Credit
Mass Mailing
Reseller Servers
Dedicated Servers
Referral Program
Reseller Program
Link Exchange
Free Virus Scan
Website Hosting

No Spam Family Friendly Web Site Hosting


Free Virus Scan

Add a clock to your site

This page will allow you to add a little clock to your site. Rule number one: You do not need to know anything about JavaScript to do this. You're just going to cut stuff, and paste it into the HTML of your web site. The results look like:

The first part you're going to need is the script that is hidden from view that does all the thinking. Then there are two parts that show the results.

  Part I: The Script

Yes, all that stuff in the box below is giberish. The question is, is giberish a word? Anyway, the important thing is that you don't have to think about it or know what it means. What you have to be able to do, is cut it and paste it into your HTML. Do that and you're done with part one.

Cut and paste the script below into your HTML


<script language="JavaScript" type="text/JavaScript">
function initArray() {
for(i=0;i<initArray.arguments.length; i++)
this[i] = initArray.arguments[i];
}
var isnMonths=new initArray("JANUARY","FEBRUARY","MARCH",
"APRIL","MAY","JUNE",
"JULY","AUGUST","SEPTEMBER",
"OCTOBER","NOVEMBER","DECEMBER");
var isnDays= new initArray("Sun","Mon","Tue","Wed",
"Thu","Fri","Sat","Sun");
today=new Date();
hrs=today.getHours();
min=today.getMinutes();
sec=today.getSeconds();
clckh=""+((hrs>12)?hrs-12:hrs);
clckm=((min<10)?"0":"")+min;
clck=(hrs>=12)?"PM":"AM";

var stnr="";
var ns="0123456789";
var a="";

function getFullYear(d) { // d is a date object
yr = d.getYear();
if (yr < 1000)
yr+=1900;
return yr;
}
</script>


  Part II: The Calls

The next two parts are, the date () and the time ( EST). Again, don't think about it, just paste either or both some time after the first part and you're done.

Date Script -

 

<script>document.write(" "+isnDays[today.getDay()]+", "+isnMonths[today.getMonth()]+" "+today.getDate()+", "+getFullYear(today)+"");</script>

 

Clock Script - EST

 

<script>document.write(" "+clckh+":"+clckm+" "+clck+" ");</script> EST

 

Don't like EST? Want to have the hours to match your local time, Just change "+clckh+" to "+clckh - 2+" in the above example.

^Back to Top

 



LOG-IN
Enter domain name:

Forgot Password?
Technical Support
SUPPORT
Start Here
Tools Manual
How To...
Email Setup
Ask A Question
Search

866-855-5445
Email Us
Contact Info
Update Billing Info
Terms of Service
Credentials
Ministry Discounts

Why Us?

Close Your Acct.

Technical Support
SITE TOYS
Stop Spam!
TimeZone Chart
Add A Clock
Stock Market Feed
Chmod Guide
Leave and I'll die
Take credit cards for ecommerce with merchant accounts.



   
Copyright 2000-2009 GraphiComm Inc., EZ2BA.COM is a service mark of GraphiComm Inc. and ez2ba.com Inc. No part of this site may be used, copied, nor reproduced without written permission from the copyright holder.
Updated: 7/15/07 Loaded: 7/04/2009.   Your IP Address is:   38.103.63.58