How to disable button when checkbox is checked and enable it when a condition is met using vbscript.
A:
Sub disableButton()
If checkMultiple.value = 1 Then
document.form1.cmdButton7.enabled = False
End If
End Sub
Sub enableButton()
document.form1.cmdButton7.enabled = False
End Sub
< i n p u t type="checkbox" name="checkMultiple" id="Multiple" onclick="disableButton )">Multiple
krusaint
2010-06-19 07:11:05
i tried the method but i got the object required "checkMultiple" error. Sub disableButton() If checkMultiple.value = 1 Then document.form1.cmdButton7.enabled = False ElseIf sum = 100 Then document.form1.cmdButton7.enabled = true End If End Sub <input type="checkbox" name="checkMultiple" id="Multiple" onclick="disableButton">Multiple
peggie
2010-06-19 07:47:41
A:
i tried the method but i got the object required "checkMultiple" error. Sub disableButton() If checkMultiple.value = 1 Then document.form1.cmdButton7.enabled = False ElseIf sum = 100 Then document.form1.cmdButton7.enabled = true End If End Sub
Multiple
peggie
2010-06-20 10:01:17