Is there any way to clear a text box when you disable it? I have the following code:
[CODE]
function DisableName(aStatus) {
if (aStatus == 1) {
document.form1.R1.disabled = true ;
document.form1.R9.disabled = true ;
document.form1.R10.disabled = true ;
document.form1.R11.disabled = true ;
document.form1.R12[0].disabled = false ;
document.form1.R12[1].disabled = false ;
document.form1.R12[2].disabled = false ;
document.form1.R13.disabled = true ;
document.form1.R14.disabled = true ;
document.form1.R15.disabled = true ;
istatus = “1”
}
else {
document.form1.R1.disabled = false ;
document.form1.R9.disabled = true ;
document.form1.R10.disabled = false ;
document.form1.R11.disabled = false ;
document.form1.R12[0].disabled = true ;
document.form1.R12[1].disabled = true ;
document.form1.R12[2].disabled = true ;
document.form1.R13.disabled = true ;
document.form1.R14.disabled = false ;
document.form1.R15.disabled = false ;
istatus = “1”
}
R1 is a text box. When this function runs, it disables the text box. However, I would like to clear the contents out of it at the same time. Can that be done?