home *** CD-ROM | disk | FTP | other *** search
- #newformat
- # © Geoff Youngs, 1999
- _title:Passworded button link
- _description:User clicks on a button which brings up the prompt for a password
- _caption:Button Caption
- _message:Alert text asking for password:
- _message:Password:
- _url:Location of protected URL:
- _insert-in:inhead
- <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
- <!--
- function pass() {
- var pass=prompt("¤message_object$(1)¤");
- if (pass=='¤message_object$(2)¤') {
- alert("Thankyou");
- location="¤url_object$(1)¤";
- } else {
- alert("Sorry, Wrong Password.")
- close()
- }
- }
- // -->
- </SCRIPT>
- _end-insert:
-
- _insert-in:inbody
- <FORM>
- <INPUT TYPE="button" VALUE="¤caption_object$(1)¤" onClick="pass()">
- </FORM>
- _end-insert:
-