Hi,
so the page is
if you click on 'Tide' you can see the password prompt appears. But the problem I am having is that even if you press cancel or do the wrong password a few times it still open up the shadow box.
This is the script for the password protection
This is an example of how a working (non shadowbox) version works successfully.
I would really appreciate some help with this,
thanks,
Luke
p.s. - I know the protection is very low - I don't care if people can find it in the code - that is not important.
so the page is
if you click on 'Tide' you can see the password prompt appears. But the problem I am having is that even if you press cancel or do the wrong password a few times it still open up the shadow box.
This is the script for the password protection
Code:
var getPass = function(el){
var ct = 3, thePrompt = 'Please Enter Your Password', theDefault = ' ', pw = '';
while(ct-- && pw !== 'pass'){
pw = prompt(thePrompt, theDefault);
if(pw === null){ ct = 0; }
thePrompt = 'Password Incorrect, Please Try Again';
theDefault = 'Password';
}
if(pw === 'pass'){
Shadowbox.open(el);
}
return false;
};
This is an example of how a working (non shadowbox) version works successfully.
I would really appreciate some help with this,
thanks,
Luke
p.s. - I know the protection is very low - I don't care if people can find it in the code - that is not important.