Javascript problems in FireFox
Posted: Thu Feb 01, 2007 8:42 pm
Strangely enough, this works in IE but not in Firefox... I cant figure it out.
Code: Select all
//This is the function that sets the times for the milestone timestamp text fields.
function SetTime(NodeName){
var MyNode = document.getElementById(NodeName);
MyNode.value = CustomTime();
MyNode.disabled = 0;
MyNode.tabIndex = 0;
}
Code: Select all
//This is a function that creates a time format that matches the HPSD format.
function CustomTime(){
var currentDate = new Date();
var day = currentDate.getDate();
var month = currentDate.getMonth() +1;
var year = currentDate.getFullYear();
var minute = currentDate.getMinutes();
var hour = currentDate.getHours();
if(day<10){day = "0" + day}
if(month<10){month = "0" + month}
if(minute<10){minute = "0" + minute}
if(hour<10){minute = "0" + hour}
return(month + "/" + day + "/" + year + " " + hour + ":" + minute);
}
Code: Select all
<body onLoad=MyToolTips()<% If request.querystring("TicketID") = "" Then response.Write(";SetTime('InvestigateStart')") End If%>>
<tr>
<td>
<div align="center">
<input type="text" name="InvestigateStart" disabled="True" tabindex="-1">
</div>
</td>
</tr>