[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cobalt-developers] Re:htaccess & forms
- Subject: [cobalt-developers] Re:htaccess & forms
- From: Keith Davis <cache@xxxxxxxxxx>
- Date: Thu Apr 5 11:06:10 2001
- Organization: Digital Odyssey Web Development
- List-id: Discussion Forum for developers on Cobalt Networks products <cobalt-developers.list.cobalt.com>
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