gabrielAllen
Programmer
I have a submit button that needs to check for either of two static passwords, which enables a submit button. Currently, I have one password that I create with:
which is in a global *.js. And I have a function in a local page that calls this function to check the password like this:
How can I incorporate a 2nd password, so that there are two different passwords that the checkPassword () can identify?
*Also, I know that passwords should not be static, but this app is in house and I don't make the rules.
Code:
var soPasswd = "Password1";
function getsoPasswd()
{
return soPasswd;
}
which is in a global *.js. And I have a function in a local page that calls this function to check the password like this:
Code:
function checkPassword(){
if (document.form.tfOtherJobTitle.value == window.parent.getsoPasswd() && document.form.checkBox.checked==true ) {
document.form.submit.disabled = false;
} else {
document.form.submit.disabled = true;
}
}
How can I incorporate a 2nd password, so that there are two different passwords that the checkPassword () can identify?
*Also, I know that passwords should not be static, but this app is in house and I don't make the rules.