Also a good idea is to assign field values trough parent form reference:
function GetTime(){
var d = new Date();
var HH= d.getHours();
var MM= d.getMinutes();
//if(HH<10) HH="0"+HH;
if(MM<10) MM="0"+MM;
document.yourFormName.time
}
Or if you do not have a form name:
function GetTime(){
var d = new Date();
var HH= d.getHours();
var MM= d.getMinutes();
//if(HH<10) HH="0"+HH;
if(MM<10) MM="0"+MM;
document.forms[0].time.val
}
Main Topics
Browse All Topics





by: ZvonkoPosted on 2005-11-04 at 14:29:17ID: 15228447
Check this:
ime").valu e =HH+c+MM;
function GetTime(){
var c = ":";
var d = new Date();
var HH= d.getHours();
var MM= d.getMinutes();
if(HH<10) HH="0"+HH;
if(MM<10) MM="0"+MM;
document.getElementById("t
}