<html> <head> <script language="javascript" type = "text/javascript"> <!-- function verify_password() { var docpwrd = prompt("Specify the password for this document:", ""); if (docpwrd == "pwrdfile") { self.location = docpwrd + ".htm"; } else { alert("That is not the correct password."); } } //--> </script> </head> <body> <form> <input type="button" value="Open Password Protected File." name="OpenFile" onClick="verify_password()"></p> </form> </body> </html>