Hi,
Sorry, I thought I had it working, but no, the problem came back  ...Since the original thread got deleted, here's the issue:
This is the login page done in server side java script:
Code:
if(user.number==0 || user.number==system.matchuser('Guest')) {
http_reply.status='401 Permission Denied';
http_reply.header["WWW-Authenticate"]='Basic realm="'+system.name+'"';
}
else {
// Note: A 302 here would mean the index would be displayed as "/login.ssjs"
// That is to say, it would display the index AS login.ssjs.
// http_reply.status='302 Found';
http_reply.status='302 Temporary Redirect';
}
http_reply.header.location='/index.ssjs';
http_reply.header.pragma='no-cache';
http_reply.header.expires='0';
http_reply.header['cache-control']='must-revalidate';
writeln('<html>');
writeln('<head>');
writeln('</head>');
writeln('<body>Logging in to <a href="/">'+system.name+'</a></body>');
writeln('</html>');
Ok, I have two text boxes, one for the user name, and one for the password, with a submit button. When I enter a valid username / password, I get the 'basic realm' authentication box. How do I avoid that?
Here's the html to login:
Code:
<form name="form1" method="post" action="/login.ssjs">
User Name: <input class="loginbox" type="text" name="form1" alt="Username" />
Password: <input class="loginbox" type="password" name="form1" alt="Password" />
<input type="submit" name="form1" value="Login" />
Side note: If I enter the correct username / password in the 'basic realm' dialog box, I get another dialog that says:
Quote:
This webpage is being
redirected to a new location. Would you like to resend the form data
you have typed to the new location?
|
I will be able to login normally from that, but how do I eliminate that altogether?
Thanks again!
-Brian
__________________
Made2Own
|