Hey guys,
I used this free tutorial on how to make a live server clock. I did, but a) doesn't work (not too worried, I am sure I can fix this) and b) it out puts the clock to a input text field?!
I want it to be in just a normal text display?
The core code:
What I put in my page:
So I want to replace the document.live_t ime_form.live_t ime_clock.value line, and also my <form> to some simple <p> or something?
Thanks for your help!
I used this free tutorial on how to make a live server clock. I did, but a) doesn't work (not too worried, I am sure I can fix this) and b) it out puts the clock to a input text field?!
I want it to be in just a normal text display?
The core code:
Code:
<!--
function startclock()
{
var server_time = new Date();
var server_hours = server_time.getHours();
var server_mins = server_time.getMinutes();
var server_secs = server_time.getSeconds();
if (server_mins < 10)
server_mins = "0" + server_mins;
if (server_secs < 10)
server_secs = "0" + server_secs;
document.live_time_form.live_time_clock.value=server_hours+":"+server_mins+":"+server_secs
setTimeout('startclock()',1000);
}
//-->
Code:
<head> ... <script type="text/javascript" src="../main/scripts/live_time.js"></script> ...
Code:
...<body onLoad="startclock()">...
Code:
...<form name="live_time_form"> Server Time: <INPUT TYPE="text" name="live_time_clock" size="15"> </form>...
Thanks for your help!
Comment