|
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
||||
|
||||
|
This is just a little something that has been on my mind. You know the clock at the bottom of the page? Would it be possible to have the time updated without having to refresh the page?
__________________
*The word "dabo" means "I will give" in Latin, and "Gold" in Aramaic. J.J. "Binks" Abrams is taking over sci-fi! Fans Expendable |
|
#2
|
||||
|
||||
|
Great suggestion!!
__________________
![]() "High Priestesses Of Zardoz" By Eliza's Starbase Of Avatars Copyright 2009." "Zardoz Speaks To You, His Choosen Trek Fans."
|
|
#3
|
||||
|
||||
|
It seems to me that it should be possible with small java script... Programming my weak spot though.
__________________
"VOTE ZARDOZ/MENHEIM IN 2012" Vice Floating God Head Patron of Eliza's Avatar Lab Founding member of The League of Extraordinary Oddballs A new tech support site http://www.community.jvgeek.com |
|
#4
|
||||
|
||||
|
Same here.
__________________
![]() "High Priestesses Of Zardoz" By Eliza's Starbase Of Avatars Copyright 2009." "Zardoz Speaks To You, His Choosen Trek Fans."
|
|
#5
|
||||
|
||||
|
Quote:
Hey do you build sites? |
|
#6
|
||||
|
||||
|
Chris I have done some before. Why whats up?
__________________
"VOTE ZARDOZ/MENHEIM IN 2012" Vice Floating God Head Patron of Eliza's Avatar Lab Founding member of The League of Extraordinary Oddballs A new tech support site http://www.community.jvgeek.com |
|
#7
|
|||
|
|||
|
Here are some:
Code:
<script type="text/javascript">
<!--
function updateClock ( )
{
var currentTime = new Date ( );
var currentHours = currentTime.getHours ( );
var currentMinutes = currentTime.getMinutes ( );
var currentSeconds = currentTime.getSeconds ( );
// Pad the minutes and seconds with leading zeros, if required
currentMinutes = ( currentMinutes < 10 ? "0" : "" ) + currentMinutes;
currentSeconds = ( currentSeconds < 10 ? "0" : "" ) + currentSeconds;
// Choose either "AM" or "PM" as appropriate
var timeOfDay = ( currentHours < 12 ) ? "AM" : "PM";
// Convert the hours component to 12-hour format if needed
currentHours = ( currentHours > 12 ) ? currentHours - 12 : currentHours;
// Convert an hours component of "0" to "12"
currentHours = ( currentHours == 0 ) ? 12 : currentHours;
// Compose the string for display
var currentTimeString = currentHours + ":" + currentMinutes + ":" + currentSeconds + " " + timeOfDay;
// Update the time display
document.getElementById("clock").firstChild.nodeValue = currentTimeString;
}
// -->
</script>
Now this is also necessary: Code:
<body onload="updateClock(); setInterval('updateClock()', 1000 )">
Of course, you will have to add custom CSS classes to clock JavaScript. You don't want it to be plain xD
__________________
I'm sorry, but English is not my primary language
|
|
#8
|
||||
|
||||
|
See I knew it was easy!
__________________
"VOTE ZARDOZ/MENHEIM IN 2012" Vice Floating God Head Patron of Eliza's Avatar Lab Founding member of The League of Extraordinary Oddballs A new tech support site http://www.community.jvgeek.com |
|
#9
|
||||
|
||||
|
__________________
![]() "High Priestesses Of Zardoz" By Eliza's Starbase Of Avatars Copyright 2009." "Zardoz Speaks To You, His Choosen Trek Fans."
|
|
#10
|
||||
|
||||
|
A bit harder than Astrophysic's with a minor in worm hole theory.
__________________
"VOTE ZARDOZ/MENHEIM IN 2012" Vice Floating God Head Patron of Eliza's Avatar Lab Founding member of The League of Extraordinary Oddballs A new tech support site http://www.community.jvgeek.com |
![]() |
| Thread Tools | |
| Display Modes | |
|
|