tags:

views:

33

answers:

2

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
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
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