View Full Version : Javascript Assistance

05-08-2004, 04:24 AM
Thank you in advance for your responses.

I have a site that has a small javascript written to look at the htaccess/htpasswd file so that a particular directory is password protected. It's worked fine for the last year until recently.

The main login form generates a user:pass@url type URL for getting the person past the login prompt. Microsoft has disabled that feature with the latest round of IE updates so you can't do that anymore.

Anybody have any suggestion on the login in on this site (http://www.bentsndents.com) to make it work correctly or a better way than Javascript.

Here is the JS code:


<!-- Begin
function Login(form) {
var username = form.username.value;
var password = form.password.value;
var server = form.server.value;
if (username && password && server) {
var htsite = "http://" + username + ":" + password + "@" + server;
window.location = htsite;
else {
alert("Please enter your username and password.");
// End -->



05-08-2004, 04:31 AM
sorry for the Emoticon drop, it should have read user:pass