I need to enter a date into a text field when form is loaded. However I need this date to be static when the form is opened at a later date.
I have the text box set to readonly. Will this be sufficient or do I need some type of Update function for when the form is opened again?
[HTML]<script language="javas cript">
window.onload = function (){
var tDay = new Date();
tMonth = tDay.getMonth() +1;
tDate = tDay.getDate();
if ( tMonth < 10) tMonth = "0"+tMonth;
if ( tDate < 10) tDate = "0"+tDate;
document.getEle mentById("OBKey __131_1").value = tMonth+"/"+tDate+"/"+tDay.getFullY ear();
}
<input type="text" name="OBKey__13 1_1" size="10" maxlength="10" tabindex="1" readonly="reado nly">[/HTML]
I have the text box set to readonly. Will this be sufficient or do I need some type of Update function for when the form is opened again?
[HTML]<script language="javas cript">
window.onload = function (){
var tDay = new Date();
tMonth = tDay.getMonth() +1;
tDate = tDay.getDate();
if ( tMonth < 10) tMonth = "0"+tMonth;
if ( tDate < 10) tDate = "0"+tDate;
document.getEle mentById("OBKey __131_1").value = tMonth+"/"+tDate+"/"+tDay.getFullY ear();
}
<input type="text" name="OBKey__13 1_1" size="10" maxlength="10" tabindex="1" readonly="reado nly">[/HTML]
Comment