Humper
09-07-2006, 02:39 PM
I cant seem to figure out how to put this javascript code into the disabled text box... the javascript code automatically fills in todays date..
here is the disabled text box
<tr><td width="73">Event Date:</td>
<td width="715"><input name=date type=text disabled value="Todays Date">
</td></tr>
and here is the javascript code
<SCRIPT Language="JavaScript">
<!-- hide from old browsers
var today = new Date()
var month = today.getMonth()+1
var year = today.getYear()
var day = today.getDate()
if(day<10) day = "0" + day
if(month<10) month= "0" + month
if(year<1000) year+=1900
document.write(month + "/" + day +
"/" + year)
//-->
</SCRIPT>
can someone show me how to put in it the disabled text box
here is the disabled text box
<tr><td width="73">Event Date:</td>
<td width="715"><input name=date type=text disabled value="Todays Date">
</td></tr>
and here is the javascript code
<SCRIPT Language="JavaScript">
<!-- hide from old browsers
var today = new Date()
var month = today.getMonth()+1
var year = today.getYear()
var day = today.getDate()
if(day<10) day = "0" + day
if(month<10) month= "0" + month
if(year<1000) year+=1900
document.write(month + "/" + day +
"/" + year)
//-->
</SCRIPT>
can someone show me how to put in it the disabled text box