home *** CD-ROM | disk | FTP | other *** search
- #newformat
- _title:Three Tries
- _author:TJS
- _description:Allows the user three tries at getting the password correct
-
- _caption:Password
- _url:Protected URL
-
- _insert-in:inbody
- <CENTER>
- <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
- <!--
- function password() {
- var testV = 1;
- var pass1 = prompt('Please Enter Your Password','');
- while (testV < 3) {
- if (!pass1)
- history.go(-1);
- if (pass1 == "¤caption_object$(1)¤") {
- alert('You Got it Right!');
- window.open('¤url_object$(1)¤');
- break;
- }
- testV+=1;
- var pass1 =
- prompt('Access Denied - Password Incorrect, Please Try Again.','Password');
- }
- if (pass1!="¤caption_object$(1)¤" & testV ==3)
- history.go(-1);
- return " ";
- }
- document.write(password());
- // End -->
- </SCRIPT>
- <CENTER>
- <FORM>
- <input type="button" value="Enter Password Protected Area" onClick="password()">
- </FORM>
- </CENTER>
- _end-insert: