views:

40

answers:

2

I'm trying to implement a function that will disable the cmdButton7 when checkbox checkMultiple is checked. and enable it again when sum = 100 using vbscript , asp.net.

I tried the method below:

Sub disableButton()
If document.form1.Multiple.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</input>

But I get this error:
object required "disableButton"

+1  A: 

Add a space between "Multiple" and onclick in your markup.

Tahbaza
A: 
<input type="checkbox" name="checkMultiple" id="Multiple" onclick="disableButton">Multiple</input>

For this error, the string "Multiple" and onclick attribute needs a space between them.

VoodooChild
Now having the product Required "disableButton" error.<br>Name: disableButton value: Empty
peggie