Use this modified function in place of the one in the script:
Code:
showLocalTime.prototype.updateContainer=function(){
var thisobj=this
if (this.displayversion=="long"){
if(this.container.tagName.toLowerCase()=='input')
this.container.value=this.localtime.toLocaleString()
else
this.container.innerHTML=this.localtime.toLocaleString()
}
else{
var hour=this.localtime.getHours()
var minutes=this.localtime.getMinutes()
var seconds=this.localtime.getSeconds()
var ampm=(hour>=12)? "PM" : "AM"
var dayofweek=weekdaystxt[this.localtime.getDay()]
if(this.container.tagName.toLowerCase()=='input')
this.container.value=formatField(hour, 1)+":"+formatField(minutes)+":"+formatField(seconds)+" "+ampm+" ("+dayofweek+")"
else
this.container.innerHTML=formatField(hour, 1)+":"+formatField(minutes)+":"+formatField(seconds)+" "+ampm+" ("+dayofweek+")"
}
setTimeout(function(){thisobj.updateContainer()}, 1000) //update container every second
}
And, instead of this:
HTML Code:
Current Server Time:<span id="timecontainer"></span>
Use this:
HTML Code:
Current Server Time:<input type="text" id="timecontainer">
Bookmarks