RE: pass words - 4/3/2001 20:26:00
Sounds like HTML password protection is what you need.Create a page that will act as the navigation/introduction to the password protected area of your site. Give it a name that is the same as the password you'd like to use. "password.htm" Do not create any links to this page anyplace on your site that is not password protected. Put the following code in the head of your documant where you will be putting the password button. Maybe on the thankyou page of your register form. code:
<SCRIPT language="JavaScript"><!-- function check() { // Prompt user for the password ... password = prompt('Enter password before continuing',''); // ... then set the browser location. (change the line below this one!) location.href = 'http://www.you.com/' + escape(password) + '.htm'; } // --> </SCRIPT>
do not change anything except the you.com. when the visitor types in the name of the page it will be combined with the .htm to name the page it should open. DO NOT put the pave name anyplace on your site. IF you do not link to it, the page can never be found. Then put this code where you want the password button to appear. code:
<DIV align="center">You must have a password to enter this site!<P> <FORM> <INPUT type="Button" onClick="check()" value="Enter Site"> </FORM> </DIV>
Clicking the Enter site button will produce a small window (about hte size of an alert box) prompting for the password. The password in the name of the page you created (password.htm)
|