I know this is a newbie question but I really need help. I created a landing page required visitor to input the password to access the target page. The below code works fine but it opened a window as a popup so Chrome blocks it. How should I edit the code below to prevent that happen? Thank you so much!
<SCRIPT>
function passWord() {
var testV = 1;
var pass1 = prompt('Please Enter the Password','');
while (testV < 3) {
if (!pass1)
history.go(-1);
if (pass1.toLowerCase() == "letmein") {
alert('Access approved! Catalogue is now open.');
window.open('sandoz-ecatalog.html','_blank');
break;
}
testV+=1;
var pass1 =
prompt('Access Denied - Password Incorrect, Please Try Again.','Password');
}
if (pass1.toLowerCase()!="password" & testV ==3)
history.go(-1);
return "";
}
</SCRIPT>