|
|
![]() |
| Thread Tools | Search this Thread |
#1
| |||
| |||
Javascript password to protect website hi, i am looking for simple Javascript password to protect my web page one can't see the password in the plain language in the source text. does someone have a version where that is perhaps coded?Any recommendations and suggestions are appreciated. |
#2
| |||
| |||
Re: Javascript password to protect website with the following version the password = is the file name on is passed on… the Script looks as follows: Code: <script language= " Javascript " > <! -- function Passw () { var passwords = “please enter you here your password!” password=prompt (“This AREA is passwords protected. Please more enter my name or password: ”, ''); location.href=password + “.html”; } //-- > </script> and becomes in such a way: Code: <a href= " javascript: Passw () “>Link to the secret Datei</a> |
#3
| |||
| |||
Re: Javascript password to protect website f your password is "lazysnake", create a file called lazysnake.html on your web site. As long as you don't link to lazysnake.html from any of your public documents, no one will be able to find it (not even the search engines)! There is generally no index of documents available for a whole web site. If you don't tell someone where you keep your protected file, they won't be able to access it. Code: <HTML> <SCRIPT language="JavaScript"><!-- function check() { // Prompt user for the password ... pwd = prompt('Enter password before continuing',''); // ... then set the browser location. (change the line below this one!) location.href = 'http://www.changethis.com/~you/' + escape(pwd) + '.html'; } // --> </SCRIPT> <HEAD> <TITLE>Site Entrance</TITLE> </HEAD> <BODY> <DIV align="center">You must have a password to enter this site!<P> <FORM> <INPUT type="Button" onClick="check()" value="Enter Site"> </FORM> </DIV> </BODY> </HTML> |
![]() |
|
Tags: javascript, password, protect, web page |
Thread Tools | Search this Thread |
|
![]() | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to protect password? | Otilio | Windows Software | 3 | 21-11-2009 05:12 PM |
Protect files from download from website | Quattro | Software Development | 3 | 06-11-2009 10:41 AM |
How to edit any website javascript with Firefox | Zariah | Software Development | 3 | 12-08-2009 05:33 PM |
How can i password protect my website | Madison | Software Development | 3 | 28-07-2009 11:01 PM |
Do google understand javascript code in my HTML website? | Sid-O | Software Development | 3 | 22-07-2009 07:45 PM |