The web page I'm working with uses <input type="button" value="View volunteer news" onClick="passWord()"> to prompt for a password and if it's correct go to a specific web page. It has worked for years, but now does not prompt for the password anymore.
I'm a novice at this.
Here is the code...
<script>
function passWord() {
var testV = 1;
var pass1 = prompt('Please Enter Your Password',' ');
while (testV < 3) {
if (!pass1)
history.go(-1);
if (pass1.toLowerCase() == "laura") {
//alert('You Got it Right!');
window.open('volunteer_news_a.html');
break;
}
testV+=1;
var pass1 =
prompt('Access Denied - Password Incorrect, Please Try Again.','Password');
}
if (pass1.toLowerCase()!="laura" & testV ==3)
history.go(-1);
return " ";
}
</SCRIPT>
<input type="button" value="View volunteer news" onClick="passWord()">
I know it is not very secure since the password is in the code, but that is fine with the user.
Any help would be appreciated. Let me know if you need more info.
Here is the page involved.
http://www.natures-nursery.org/volunteers_only.html
