views:

68

answers:

2

I am wondering how to do a simple Javascript log in for my web pages on my dev server. I want it to be very simple, like the ones that pop up when you go to 192.168.1.1 to adjust the settings on your Linksys router.

Any suggestions?

+2  A: 

This isn't JavaScript, it's actually how browsers handle HTTP authentication.

Here's a really basic example in PHP.

Matt
+1  A: 

AFAIK most of the routers use an HTTP basic authentication that is defined in a .htaccess file. Just google for "HTTP basic authentication" to find some generators for this.

If you want to go with HTML: is there a problem with a plain form with a text input for the username and a password input for the password?

Patrick Bergner