Page 1 of 1

Javascript problems in FireFox

Posted: Thu Feb 01, 2007 8:42 pm
by trent2800
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>

Posted: Fri Feb 02, 2007 8:58 am
by feyd
Quotes missing? Malformed HTML?

Posted: Fri Feb 02, 2007 9:14 am
by onion2k
Install Firebug.

Posted: Fri Feb 02, 2007 11:39 am
by jyhm
onion2k wrote:Install Firebug.
I second that! hooray FireBug!

Posted: Sat Feb 03, 2007 4:00 pm
by garry27
there's a decent video tutorial for firebug at: http://www.digitalmediaminute.com/scree ... irebug-js/ if anyone's interested.