+ inputfield.onkeydown = function(e) {
+ var key;
+ if (window.event) { key = window.event.keyCode; }
+ else { key = e.which; } // for ff browsers
+ // some browsers allow the enter key to submit a form even if the submit button is disabled
+ // below prevents enter key from submiting form if password has not been validated.
+ if (key == '13') {
+ var check = checkPasswordValidation();
+ return check;
+ }
+ }
+ inputfield.onkeyup = function () {