Rectangle 27 0

javascript EnableDisable submit button if checkbox is checkedunchecked?


<input type="checkbox" name="TOS" value="Accept" onClick="EnableSubmit()"> I agree to Terms of Service agreement.
onClick="EnableSubmit()"
Note
Rectangle 27 0

javascript EnableDisable submit button if checkbox is checkedunchecked?


<td width="30%">Do you accept Terms of Service agreement?</td>
<td width="10px" style="min-width: 10px"></td>
<td width="70%">
    <input type="checkbox" name="TOS" value="Accept" onClick="EnableSubmit(this)"> I agree to Terms of Service agreement.
</td>

Could you re-enter your question to include the rest of the source for the form (the HTML)? And any other JavaScript you might be using?

Reason it's not working: you're not passing your function anything. Actually, because you've not used parentheses with the function name, you've not called the function at all. Passing it this in the context of the onclick HTML event attribute means you're passing a reference to the element's DOM object, giving you access to its checked property.

Note
Rectangle 27 0

javascript EnableDisable submit button if checkbox is checkedunchecked?


<td width="30%">Do you accept Terms of Service agreement?</td>
<td width="10px" style="min-width: 10px"></td>
<td width="70%">
    <input type="checkbox" name="TOS" value="Accept" onClick="EnableSubmit(this)"> I agree to Terms of Service agreement.
</td>

Could you re-enter your question to include the rest of the source for the form (the HTML)? And any other JavaScript you might be using?

Reason it's not working: you're not passing your function anything. Actually, because you've not used parentheses with the function name, you've not called the function at all. Passing it this in the context of the onclick HTML event attribute means you're passing a reference to the element's DOM object, giving you access to its checked property.

Note
Rectangle 27 0

javascript EnableDisable submit button if checkbox is checkedunchecked?


<input type="checkbox" name="TOS" value="Accept" onClick="EnableSubmit()"> I agree to Terms of Service agreement.
onClick="EnableSubmit()"
Note
Rectangle 27 0

javascript EnableDisable submit button if checkbox is checkedunchecked?


<input type="checkbox" name="TOS" value="Accept" onClick="EnableSubmit()"> I agree to Terms of Service agreement.
onClick="EnableSubmit()"
Note