Change of script for password protect file

S

Shona

Hi

Hi

I have this script but when the person puts in the correct password it comes
up with correct password and they have to click OK does anyone know which
part of this do I remove to save them having to do this

var Pw = document.pass.protect.value
if (Pw=="null")
{pass_protect=0}
else
{
i = 0
while (i < 3)
{
switch(Pw){
case passwords :
alert("Correct Pass")
window.location="http://www.file.asp" ;
//Change the html file above
pass_protect = 1
//Change the html file above
break ;
}
i = i + 1
}
}
if (pass_protect==0)
{
alert("Incorrect Pass")
window.location="http://www/Index.htm"}
//Change the html file above
}

Thanks Shona
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top