function passwordResend() { if( document.getElementById('email').value == '' ) { alert('The email field must contain a value.'); return null; } RegistrationBean.performPasswordResend(document.getElementById('email').value, passwordDisplayResendResult); } function passwordDisplayResendResult(result) { if( result == "true" ) { alert("Your password was resent.\n\nPlease wait a few minutes and retrieve the password from your email."); } }