Hi
I have a login script that works fine in IE but nothing happens in netscape.
Code:
//This is in the head of the page
function Login(form) {
var form = document.forms[0];
var username = form.username.value;
var password = form.password.value;
var server = form.server.value;
if (username && password && server) {
var htsite = "http://" + username + ":" + password + "@" + server;
window.location = htsite;
function login() {
var username = frmLogin.username.value;
var password = frmLogin.password.value;
var server = "217.34.217.125";
var site = "http://" + username + ":" + password + "@" + server;
child = window.open(site,'child','');
test();
}
function test() {
window.setTimeout('child.location.href="http://217.34.217.125"', 3000);
}
}
else {
alert("Please enter your username and password.");
}
}
//this is in the body of the page
<form name=login>
<input type="hidden" name="server" value="217.34.217.122/Prod
Cat/default.asp?Region=Compressor">
<B>Username:</B>
<input type=text name=username size=18>
<B>Password:</B>
<input type=password name=password size=18>
<a href="javascript:Login(this.form)">
<img src="/local/It/uniq0371d.nsf/GO_44.jpg?OpenImageResource" border = "0">
</a></form></form><form onSubmit = "Javascript:doSearch(window);return(false)"><input name="search" size = 18><input type="image" onClick="doSearch(window); return false;" src="/local/it/uniq0371d.nsf/Search_29.jpg?OpenImageResource" border =0></form>
could anyone advise as to how I can adapt the code to allow it to function in both browsers.
Thanks in advance for any help given
Toka1