Welcome Visitor, Please Login or Register Now |
|
Sunday, April 28, 2024 02:48 PM |
|
totalbids |
Registered Member |
Posts: 64 |
Joined: 04-28-24 02:48 PM |
Location: Southend |
|
|
|
|
|
|
|
|
Javascript liveclock |
Edit Delete Quote |
First Post Posted on: 02-28-08 11:30 PM |
|
|
|
Hello all.
I have finally managed to get a live clock running on my site. You can view it at www.totalbids.co.uk
If anyone would like this option then please email me at admin@totalbids.co.uk and i will send you the file and the instructions on how to do this.
This basically replaces the static clock on the welcome area on every page.
Cheers
Jason |
|
|
|
|
|
|
Marty |
Registered Member |
Posts: |
Joined: 04-28-24 02:48 PM |
|
|
|
|
PM |
|
|
|
|
Re: Javascript liveclock |
Edit Delete Quote |
Reply #: 1 Posted on: 03-02-08 01:49 AM |
|
|
|
I was wondering if you could post your java clock script here ?
I have a similar clock on my own site, but the problem is my clock gets the time from my PC not my server thus, when viewing an Item "ViewItem" You get two different times.
My point is that iam trying to apply a live clock to the ViewItem pages but I cant get the 2 (same) scripts running on the same page etc.. |
|
|
|
|
|
|
Marty |
Registered Member |
Posts: |
Joined: 04-28-24 02:48 PM |
|
|
|
|
PM |
|
|
|
|
Re: Javascript liveclock |
Edit Delete Quote |
Reply #: 2 Posted on: 03-02-08 03:32 AM |
|
|
|
Theres probably an easier way but heres what I did......
BTW do this at your own risk 8) Mewsoft are not responsible for any loss or damaged data.
Open your admin panel enter into..........
General Classes :
Open......
Welcome_Area
Find this <!--CLASS:ate_Time:11--> and delete it. Replace it with the follow code......
<script> var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday") var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December")
function getthedate(){ var mydate=new Date() var year=mydate.getYear() if (year < 1000) year+=1900 var day=mydate.getDay() var month=mydate.getMonth() var daym=mydate.getDate() if (daym<10) daym="0"+daym var hours=mydate.getHours() var minutes=mydate.getMinutes() var seconds=mydate.getSeconds() var dn="AM" if (hours>=12) dn="PM" if (hours>12){ hours=hours-12 } if (hours==0) hours=12 if (minutes<=9) minutes="0"+minutes if (seconds<=9) seconds="0"+seconds var cdate="<large><font color='F0F8FF' face='TAHOMA, ARIAL, TIMES'><b>"+dayarray[day]+", "+montharray[month]+" "+daym+", "+year+" "+hours+":"+minutes+":"+seconds+" "+dn +"</b></font></small>" if (document.all) document.all.clock.innerHTML=cdate else if (document.getElementById) document.getElementById("clock").innerHTML=cdate else document.write(cdate) } if (!document.all&&!document.getElementById) getthedate() function goforit(){ if (document.all||document.getElementById) setInterval("getthedate()",1000) }
</script> <span id="clock"></span>
Last bit, Copy/Paste this <body onLoad="goforit()"> anywhere after that.
|
|
|
|
|
|
|
|
|
Mewsoft and Mewsoft Logos are registered trademarks.
® Corporation. All Rights Reserved.
Copyright -
Privacy -
Terms of Use
| Page Load: 0.0839 Seconds |
|