htaccess Login | JavaScriptSource

htaccess Login

Gordon Hudson Jun 12, 2001
Allows you to have a login box embedded in your web page for pages that normally is only available through a pop up dialogue box. Cool!
Username:

Password:

The JavaScript Source: Navigation: htaccess Login

Simply click inside the window below, use your cursor to highlight the script, and copy (type Control-c or Apple-c) the script into a new file in your text editor (such as Note Pad or Simple Text) and save (Control-s or Command-s). The script is yours!!!

    

Did you use this script?  Do you like this site?  Please link to us!

Leave a Response

(
6 comments)

Worked great! Not sure what people above are complaining about. Would be nice to know if there is anyway to use javascript to handle incorrect logins instead of displaying the native htaccess login window if incorrect. Anywho.. Thanks again for the great example!

Dan Jun 27, 2013

Because you need to use an .htaccess login file, as the name of the script suggests.

Lee Jan 16, 2009

It should be as shown: "www.domain.com/secure/". You would also need to [a href="http://www.javascriptkit.com/howto/htaccess3.shtml"]create the login info[/a] in an .htaccess file. For additional information, you will need to post your question on [a href="http://www.webdeveloper.com/forum/forumdisplay.php?f=3"]the JavaScript forum[/a]. Thanks!

Lee Jan 16, 2009

Could you please explain where I put the username and password that people could use to login to this page? And can this be used to when the visitor clicks login it takes you to a separate html file that is within a hidden or secure folder?[br /][br /]I love the script and format, just looking for a little more direction to make it work! Thanks!

Kiley Jan 14, 2009

what is the the use of login html code when there is no code for register???????????

jp Nov 26, 2008