Donate SIGN UP

Javascript passwords

Avatar Image
mollymoo | 17:53 Sun 30th Jan 2005 | Technology
3 Answers

Hi I already have a code on a web page that if you click on that link it asks for a password. However what I would liek to also do is have a password on a page for example.


If someone found the page via a search engine if they clciked on that link it would ask for a password. Or if they knew the exact URL it would ask for a password before openign the page. Is there some simple Javascript for this or do I need to use CGI?


I am not a JavaScript expert!!



Thanks

Gravatar

Answers

1 to 3 of 3rss feed

Best Answer

No best answer has yet been selected by mollymoo. Once a best answer has been selected, it will be shown here.

For more on marking an answer as the "Best Answer", please visit our FAQ.

Do you want this for a page or for a folder?

If you want this for a folder there are simple standard solutions which should be provided with your server host. If you want it for a page and you want it secure, I would use a page generating language, e.g. PHP. A combination of javascript and PHP is by far the best language to program something like this with.

Henry

Question Author

Is it somehing that needs programming or is it something I can copy and paste and just change  the password in the code. I am a complete novice at web design and have hardly any knowledge. I am scrap by changing basic Javascript in relation to colours and stuff.

Any links to these codes much apprecaited.

Technically speaking, JavaScript isn't the best way to perform password checks. Something like PHP, ASP or Perl would better (ie, server side password checking). JavaScript runs on the client (in the browser) so the person can see the password checking code and possibly hack it if they so wished. Anyway, have a look here for a JavaScript example :

http://javascript.internet.com/passwords/login-coder.htm l

1 to 3 of 3rss feed

Do you know the answer?

Javascript passwords

Answer Question >>

Related Questions

Sorry, we can't find any related questions. Try using the search bar at the top of the page to search for some keywords, or choose a topic and submit your own question.