[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-developers] Re:htaccess & forms



Since this is a week old I sent it offlist:


> Does anyone know of a way to have a form that asks for username/password and
> then jumps to another site and passes htaccess the username/password entered
> so they don't see that ugly pop-up box?

This page uses javascript. It collects the username/password and parses
it to a location string that bypasses the popup.
<HTML>
<BODY>
<form>
<input name=username value=""><br>username<p>
<input name=userpass value=""><br>password<p>
<input type=button value=Submit
onclick=location="http://"+this.form.username.value+":"+this.form.userpass.value+"@yourDomain/securedDir/targeted.html";>
</form>
</BODY>
</HTML>

I don't know about php, but sending the values to the server to be
parsed as a Perl redirect will not work. With IE you still get the
pop-up, if you cancel you get the "auth failed" page with the
http://username:userpass@yourDomain/securedDir/targeted.html in the
location, hit "reload" and you're in. Weird to say the least....

keith