Heres my dilemma.

I have directories set up on my server that are password protected that include client's projects. They can log in to see the progress of work being done for them.

Rather than having them click a link, or type in a url and then be prompted by the windows looking LOGIN/PASSWORD box (you know..the one that appears when accessing restricted directores...)

is there a way that (i already have a login/pass form) by using the data entered into these fields, based on the pre-defined results (bob enters his login/pass...goes to his site, mary etc. etc.) that this information can take users to their designated space WITHOUT having to enter the information in the popup window again?

Do you know what i mean?

I searched all over here, and while finding a COUPLE articles, nothing that (other than CRAZY coding which is unnecessary) can help me easily accomplish this.

I want to have this NOT open up another page, and then redirect, if at all possible, and just based on the login/pass they enter take them to a predetermined web page.


This is the script that i was using: (which redirects to the page, but since the page is password protected, STILL brings up the login/pass window which is trying to be bypassed.)



(i know the passwords will be visible, but my clientele wont/isnt that adept at figuring these types of things out...)

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
function Login(){
var done=0;
var username=document.login.username.value;
username=username.toLowerCase();
var password=document.login.password.value;
password=password.toLowerCase();
if (username=="USERNAMEONE" && password=="PASSWORD") { window.location="http://www.MYURL.com/forum/"; done=1; }
if (username=="BOB" && password=="BOBPASSWORD") { window.location="http://www.MYURL.com/test_sites/BOB/"; done=1; }
if (username=="MARY" && password=="MARYPASSWORD") { window.location="http://www.MYURL.com/test_sites/MARY"; done=1; }
if (done==0) { alert("Invalid login!"); }
}
// End -->
</SCRIPT>


and the code for the form

<form name=login>
<table width=170 cellpadding=3>
<tr>
<td width="5" rowspan="2">&nbsp;</td>
<td width="58"><div align="left"><span class="style33 style34 style37">Username:</span></div></td>
<td width="79"><div align="left">
<input name=username type=text id="username" size="9" maxlength="14">
</div></td>
</tr>
<tr>
<td><div align="left"><span class="style33 style34 style37">Password:</span></div></td>
<td><div align="left">
<input name=password type=text id="password" size="6" maxlength="5">
</div></td>
</tr>
<tr>
<td align=center>
<div align="right"> </div></td>
<td align=center>&nbsp;</td>
<td align=center><img src="graphics/login.gif" alt="Login" onClick="Login()"></td>
</tr>
</table>
</form>



I hope I explained everything good enough. I realize that I could just remove the restrictions to the directories (/bob, /mary, etc.) and just put up some dummy 'ACCESS TO THIS DIRECTORY IS RESTRICTED 'index.html' file in the root of the subdirectory, (to prevent people from snooping)...but im trying to learn something here and get the best out of both worlds.

THanks for the help!!