Ben bu forumu tamamlamaya çalışıyorum fakat submite bastığımda girdigim bilgiler dogrulandı ise ekrana gelmesi gerekiyor showme ile fakat dogruda girsem yanlışta girsem hiçbirşey gelmiyor acaba neden?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/HTML4.01/strict.dtd">
function ProcessForm() { showMe(); }//end ProcessForm() function showMe() { var name; name=window.document.frmMain.txtName.value; var surname; surname=window.document.frmMain.txtSurname.value: var username; username=window.document.frmMain.txtUsername.value; var password; password=window.document.frmMain.txtPassword.value; var city; index =window.document.frmMain.selectCity.selectedIndex; cityName=window.document.frmMain.selectCity[index].text; alert("Your name :" + name + "\nSurname :" + surname + "\nUsername :" + username + "\nCity Name :" + cityName + "\nPassword :" + password); document.frmMain.selectCity.selectedIndex=0; }
function ValidateForm(FormToCheck) { var fObjPassword = new Object(); var fObjConfirm = new Object();
function ValidatePassword(Password,PasswordConfirm) { var bolIsError = new Boolean(false); var strErrorMsg = new String(""); var objError = new Object();
if((CheckForEmpty(Password.value) == true)) { bolIsError = true; strErrorMsg = "ERROR: Password is blank. You must type a valid password."; objError = Password; }else if((CheckForEmpty(PasswordConfirm.value))){ bolIsError = true; strErrorMsg = "ERROR: Confirm field is blank. You must confirm your password."; objError = PasswordConfirm; }else if((Password.value)!=(PasswordConfirm.value)){ bolIsError = true; strErrorMsg = "ERROR: Password and confirm field do not match. They must match."; objError = Password; }else if(InvalidLength(Password.value,7,11)){ bolIsError = true; strErrorMsg = "ERROR: Password must be between 7 and 11 characters long."; objError = Password; }else if(InvalidChars(Password.value)){ bolIsError = true; strErrorMsg = "ERROR: Your password contains illegal characters. Please use "; strErrorMsg += "ONLY UPPERCASE LETTERS, lowercase letters or digits (0-9)."; objError = Password; }else if(MeetMinReqs(Password.value)){ bolIsError = true; strErrorMsg = "ERROR: Your password MUST contain AT LEAST ONE UPPERCASE LETTER, "; strErrorMsg += "AT LEAST ONE lowercase letter and AT LEAST ONE digit."; objError = Password; }//end if