WebSiteMadeEasy.net
|
FontsMadeEasy.com
|
RankChecker.net
Google Search:
Learn Java Script Today
|
Over 5000 Free Fonts
|
Tutorials
|
Javascript Forum
|
Other Javascript Resources
|
Cheat Sheet
JavaScript Basics
Inserting Javascript
Complete Tutorial
Advance DHTML Tutorial
Script archive
Advance Tutorials
Alert Scripts
Animation
Audio
Background Effects
Banner Ads
Browser Window
Buttons
Button Forms
Calculcators
Calendars
Clocks & Dates
Cookies
Cursor Effects
DHMTL Games
DHTML Miscellaneous
Equivalents
Forms
Games
IE4+ Scripts
IE5+ Scripts
Image Effects
Image Miscellaneous
Links & Buttons
Math Related
Messages Miscellaneous
Miscellaneous
Mouse Tricks
Navigation
Page Details
Password Protection
Pulldown Menus
Random Stuff
Scrolling
Status Bar
Text Animation
User Detail
User Info
Window Control
Password Protected Page
This script opens a new window requesting a password then if the password is correct it take the user to the page.
Enter Page
Page 1 - pass.htm
Insert into <HEAD>
<script language="JavaScript"> <!-- Hide from old browsers // Copyright © 1999 Doug Popeney // Created by Doug Popeney (easyjava@easyjavascipt.com) // JavaScript Made Easy!! - http://www.easyjavascript.com var new_window = null; function password() { new_window = window.open('FILENAME OF SECOND PAGE', 'pass', 'width=350,height=200,resizable=1'); } // End hiding ---> </SCRIPT>
Insert into <BODY>
<A HREF="javascript:password()">LINK DESCRIPTION</A>
Page 2 - passme.htm
Insert ito <HEAD>
<script language="JavaScript"> <!-- Hide from old browsers // Copyright © 1999 Doug Popeney // Created by Doug Popeney (easyjava@easyjavascipt.com) // JavaScript Made Easy!! - http://www.easyjavascript.com function goForit() { var location; var password; password=this.document.testform.inputbox.value location=password + ".htm" fetch(location) theKeeper=window.close() } function fetch(location) { var root; if (opener.closed) {root=window.open('','passme','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no'); root.location.href = location; } else { opener.location.href = location; } } // End hiding ---> </SCRIPT>
Insert into <BODY>
<FORM NAME="testform"> <INPUT TYPE="text" NAME="inputbox" VALUE="" size=20> <INPUT TYPE="button" NAME="button" Value="Submit Password" onClick="goForit(this.form)"></FORM>
Page 3 - kurac.htm
OK, now the password that you want will be the name of the third file minus the extention and period. NOTE: This is case sensitive! So now all you need to do is to make your secret page!!!
Insttructions
Page 1 - pass.htm OK, here's the skinny. This script uses three pages. Let's start the first page. Call that page what ever you want (i.e. "pass.htm"). Copy this into your <head></head> tag. <script language="JavaScript"> <!-- Hide from old browsers // Copyright © 1999 Doug Popeney // Created by Doug Popeney (easyjava@easyjavascipt.com) // JavaScript Made Easy!! - http://www.easyjavascript.com var new_window = null; function password() { new_window = window.open('FILENAME OF SECOND PAGE', 'pass', 'width=350,height=200,resizable=1'); } // End hiding ---> </SCRIPT> Now this is how you call the link. <A HREF="javascript:password()">LINK DESCRIPTION</A> On this first page all you need to do is change the FILENAME OF SECOND PAGE, mine is "passme.htm". End of page 1 -------------------------------------------------------------------------------- Page 2 - passme.htm Now for the second page. Copy this into your <head></head> tag. <script language="JavaScript"> <!-- Hide from old browsers // Copyright © 1999 Doug Popeney // Created by Doug Popeney (easyjava@easyjavascipt.com) // JavaScript Made Easy!! - http://www.easyjavascript.com function goForit() { var location; var password; password=this.document.testform.inputbox.value location=password + ".htm" fetch(location) theKeeper=window.close() } function fetch(location) { var root; if (opener.closed) {root=window.open('','passme','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no'); root.location.href = location; } else { opener.location.href = location; } } // End hiding ---> </SCRIPT> If your secret page has the ".html" extension then you need to change the line location=password + ".htm" to location=password + ".htm" Now put this in the body of your doc. <FORM NAME="testform"> <INPUT TYPE="text" NAME="inputbox" VALUE="" size=20> <INPUT TYPE="button" NAME="button" Value="Submit Password" onClick="goForit(this.form)"></FORM> End of page 2 -------------------------------------------------------------------------------- Page 3 - kurac.htm OK, now the password that you want will be the name of the third file minus the extention and period. NOTE: This is case sensitive! So now all you need to do is to make your secret page!!!