Firefox works great (with the exception of the confirmation box that pops up on the screen asking you if you are sure you want to use the user name that you've JUST used in order to log in). Netscape 7 works too, but the PROBLEM is that after one has logged in, his/her user name and password are displayed in the Address Field in the browser, like this: http://[COLOR="Red"]user_name: password[/COLOR]@www.site.com/secureDirectory/ (Example: http://johnDoe:myPassword@www.hello.com/myProtectedDir/)
Internet Explorer 6.0 does NOT work at all, and I can't seem to figure out why the javascript code is not working in this browser. In fact, if you click on the above non-working link, you will get the error page that looks exactly like what I am getting here in IE 6.0...
Questions:
1) How do I need to modify the script so that USER_NAME and PASSWORD are not displayed in the Address Bar of Netscape (and IE)?
2) What error in the code prevents it from working in IE 6.0?
Thank you. I appreciate your help....
- Code: Select all
<!-- Begin
function getIn(loginForm) {
var username = document.loginForm.userName.value;
var password = document.loginForm.pass.value;
var server = document.loginForm.server.value;
if (username && password && server) {
var htsite = "http://" + username + ":" + password + "@" + server;
window.location = htsite;
}
else {
alert("Please enter your username and password.");
}
}
// End -->
=========================================================
<body>
<table style="margin:0px;"border="1" width="100%" id="table1" cellspacing="1">
<tr>
<td>
<form method="POST" action=" " name="loginForm">
<input type="hidden" name="server" value="www.mailbox-it.com/tempNewSite/info_university/">
<table style="margin:0px"width="100%">
<tr>
<td>User Name</td>
<td><input type="text" name="userName" size="20"></td></tr>
<tr>
<td>Password</td>
<td><input type="password" name="pass" size="20"></td></tr>
<tr>
<td> </td>
<td><input type="button" value="Log In" name="button" onclick="getIn()"></td></tr>
</table>
</form>
</td>
</tr>
</table>
</body>


