/** * Process the submit event from the login form. */ function LoginFormSubmitHandler() { var loginFormPasswordElement; var loginFormUserElement; loginFormPasswordElement = document.getElementById("login-form-password"); loginFormUserElement = document.getElementById("login-form-user"); try { login(loginFormPasswordElement.value, loginFormUserElement.value); } catch(e) { loginFormPasswordElement.classList.add("invalid"); loginFormUserElement.classList.add("invalid"); } }