|
I need help on how to deactivate a button if a visitor to my site do not click on the check box in agreement with my policy. I want the checking of the box to prompt the activation of the button in other to proceed to the next step of the registration procedure.
|
|
|
use a javascript function and create a checkbox for TOS if he click the checkbox then set the submit button attribute to disabled something like this
function tos(checkbox){
if(checkbox.value == true)
document.getElementById("button_id").disabled = "disabled";
else
document.getElementById("button_id").disabled = false;
}
---code for checkbox--
<input type="checkbox" onclick="tos(this)">
|
|
|
better make the required button deactivate(disable)by writing
button1.enable=false;
in form load
and make it enable only when the user checks the checkbox.
write the below code in checkbox_checked change event
if(checkbox1.checked==true)
{
button1.enable=true;
}
if(checkbox1.checked==false)
{
button1.enable=false;
}
Web Development Services
|
|
|