pwallas
03-18-2007, 03:54 PM
With zero Javascript experience, I long ago found a simple password script to provide very minimal access control to some web pages I maintain. Now that I've upgraded to IE7, I find the script does not work, or I don't yet know how to set IE7 to allow it to work. What I've been using has the advantage of not including the password in the script, but the disadvantage that everyone (members of a local homeowners' association) has the same "password"
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var password = ''
password=prompt('Please enter your password:','');
if (password != null) {
location.href= password + ".html";
}
// End -->
</SCRIPT>
Right now, when the script runs, IE7's information bar says a scripted window is asking for information, but when I allow that window, box to enter the "password" does not appear. If anyone can help me fix the script or figure out how IE7 needs to be set, that would be great.
Thanks,
Phil Wallas
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var password = ''
password=prompt('Please enter your password:','');
if (password != null) {
location.href= password + ".html";
}
// End -->
</SCRIPT>
Right now, when the script runs, IE7's information bar says a scripted window is asking for information, but when I allow that window, box to enter the "password" does not appear. If anyone can help me fix the script or figure out how IE7 needs to be set, that would be great.
Thanks,
Phil Wallas