Javascrip password code
Posted on 2004-11-10
i have this code:
<a href="page1.htm" onclick="ConfirmPassword( this ); return false;" > Enter </a>
// get the password
var strPassword = prompt( "Please Enter Password Here" );
// Go to the password protected page
window.location.href = "www.domain.com/" + strPassword + "/" + objTargetLink.href;
which only allows people to view my page, if they enter a correct password. i have a few problems with it i am using dw mx 2004.
1. the page loads and then asks for the password so people can see the contents of the page when it asks for the password.
2. the word undifined appears in the password slot, how do i define my password?
any help would be appreciated