Okay, this may be hard to explain.
The Passwords don't work the usernames do.
I am reading from a text file.
"username,password" is the structure for the below is the text file
John,BOL12345
Mary2,BOL77777
Anna,BOL54321
test,BOL12345
The top 3 do not work alone i only need the top 3
but once i add the "test,BOL12345"
the password BOL12345 does work
but without the "test,BOL12345" The password "BOL12345" does not work or any of the other ones
I am doing this all in javascript below will be the code snippet.. please ask any questions as i do not understand why this happens.
The JavaScript Below
The "lines" = the text file above
lines = x.responseText.split("\n");
for (i=0; i < lines.length; i++)
{
test1 = lines[i].split(",")
username.push(test1[0]);
password.push(test1[1]);
}
var tempUsername = document.getElementById('username').value;
var tempPassword = document.getElementById('password').value;
var arraycontainsusername = (username.indexOf(tempUsername) > -1);
var arraycontainspassword = (password.indexOf(tempPassword) > -1);
alert(password);
if (arraycontainsusername && arraycontainspassword) {
window.location.href = "listing.htm";
};