Logging into Site Won't Work Should Have Popup Message or Going to Page

allgenresaacy

New Member
Okay, so for a while I've been developing a site with a working login form that works like it should. It should login if the credentials are correct but if the credentials used to login are not correct a popup message will show as shown in the \[code\]else\[/code\] statements Below is the \[code\]login.js\[/code\]\[code\]function Login(form) {flag = false;username = new Array("alex364981");password = new Array("Codylewis");page = "admin/admin242f1221r2fd2fd12r" + ".html";if (form.username.value =http://stackoverflow.com/questions/14469792/= username[0] && form.password.value == password[0] || form.username.value == username[1] && form.password.value == password[1] || form.username.value == username[2] && form.password.value == password[2] || form.username.value == username[3] && form.password.value == password[3] || form.username.value == username[4] && form.password.value == password[4] || form.username.value == username[5] && form.password.value == password[5] || form.username.value == username[6] && form.password.value == password[6] || form.username.value == username[7] && form.password.value == password[7] || form.username.value == username[8] && form.password.value == password[8] || form.username.value == username[9] && form.password.value == password[9]){ self.location.href = page; flag = true;}flag = false;username = new Array("vSpark530");password = new Array("ChloeGrace417");page = "users/user_vSpark530_222_reviewer" + ".html";if (form.username.value =http://stackoverflow.com/questions/14469792/= username[0] && form.password.value == password[0] || form.username.value == username[1] && form.password.value == password[1] || form.username.value == username[2] && form.password.value == password[2] || form.username.value == username[3] && form.password.value == password[3] || form.username.value == username[4] && form.password.value == password[4] || form.username.value == username[5] && form.password.value == password[5] || form.username.value == username[6] && form.password.value == password[6] || form.username.value == username[7] && form.password.value == password[7] || form.username.value == username[8] && form.password.value == password[8] || form.username.value == username[9] && form.password.value == password[9]){ self.location.href = page; flag = true;}flag = false;username = new Array("mom_of_author01");password = new Array("tartar21");page = "users/user_mama2e213d_2r2fqafftgj42" + ".html";if (form.username.value =http://stackoverflow.com/questions/14469792/= username[0] && form.password.value == password[0] || form.username.value == username[1] && form.password.value == password[1] || form.username.value == username[2] && form.password.value == password[2] || form.username.value == username[3] && form.password.value == password[3] || form.username.value == username[4] && form.password.value == password[4] || form.username.value == username[5] && form.password.value == password[5] || form.username.value == username[6] && form.password.value == password[6] || form.username.value == username[7] && form.password.value == password[7] || form.username.value == username[8] && form.password.value == password[8] || form.username.value == username[9] && form.password.value == password[9]){ self.location.href = page; flag = true;}if(!flag) { alert("Either the Username or Password is Wrong.\nPlease try again."); form.username.focus();}return true;}flag = false;username = new Array("admin_login");password = new Array("test");page = "test" + ".html";if (form.username.value =http://stackoverflow.com/questions/14469792/= username[0] && form.password.value == password[0] || form.username.value == username[1] && form.password.value == password[1] || form.username.value == username[2] && form.password.value == password[2] || form.username.value == username[3] && form.password.value == password[3] || form.username.value == username[4] && form.password.value == password[4] || form.username.value == username[5] && form.password.value == password[5] || form.username.value == username[6] && form.password.value == password[6] || form.username.value == username[7] && form.password.value == password[7] || form.username.value == username[8] && form.password.value == password[8] || form.username.value == username[9] && form.password.value == password[9]){ self.location.href = page; flag = true;}if(!flag) { alert("Either the Username or Password is Wrong.\nPlease try again."); form.username.focus();}return true;}\[/code\]
 
Back
Top