JavaScript Resources

JavaScript Deliver Password Protected Content
 



JavaScript: Deliver Password Protected Content

Description:

This is super simple. DO NOT RELY ON IT FOR TOTAL SECURITY!!!

The file password.html uses a call to an external Javascript. Based on the user password (or you could use it as a
simple keyword search, too) dynamic content is delivered to the page.
The cool thing is if you reload it.. you have to put the password in the prompt field.

You can just cut and paste it to two files one with htm or html extensions and the other with .js extension.Play
around with it. You can change the if statements to whatever 'password' or 'keyword' you want.

Use the document.write to build the page for you. The external javascript keeps folks from saving the page or right
clicking to get to get it the info(passwords).

I'm sure someone knows how to get the info from an external file and when prompted..save file to disk 'to view
source of the external script), but this is a good client-side protection method. You could hide it in an include file
or another js file to mask to information or run it server side.

Browsers Compatibility:
IE, Firefox
 Download





more Resources Scripts: Forms, Text, Buttons, Games, Calendars, Miscellaneous, Utilities, Clocks,
Navigation, Windows, Cookies, Special Effects, Counters, Passwords, DHTML



[Home] [Templates] [Blog] [Forum] [Directory] JavaScript Resources - JavaScript Deliver Password Protected Content