I will offer a JQuery script as the Javascript is a bit long and it is SO simple in JQuery.
First lets include the JQuery Library from Google.
- <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
Next lets assume you verification code input box has an attribute ID="VerifyCD".
We add a functiuon to fire OnBlur (when you leave the verification text box) that will check the code and enable/disable all other input text boxes:
- $('#VerifyCD).blur(function() {
-
if ($('#VerifyCD).val() <> "ng075" ) {
-
$('input:text').attr('disabled', true);
-
$('#VerifyCD).removeAttr('disabled');
-
} else {
-
$('input:text').removeAttr('disabled');
-
}
-
-
});
How it works:
$('#VerifyCD).blur(function() just means when the user leaves the VerifyCD textbox, run this function.
if ($('#VerifyCD).val() <> "ng075" ) just says if the value they entered is NOT your verify code then
$('input:text') take all text input boxes
.attr('disabled', true); and set their disable attribute to true
- $('#VerifyCD).removeAttr('disabled');
alweays re-enable our VerifyCD text box
$('input:text') take all text input boxes
.removeAttr('disabled'); and remove their disable attr
}
I know it is not quite what you asked for, but I hope that helps.
Sean