Hey, i am trying to use a form to log into a domain control panel. cpanel. but something is up with my code, and I have no idea where the problem is. can anyone tell me what they think might be the problem? basicly the user put’s in their username, password and domain name, once they hit submit it pulls the login function and supposed to redirect the url to their panel but it just refreshes the screen and nothing happens.
heres what I got…
[list]
<form name=”log1″>
<SCRIPT LANGUAGE=”JavaScript”>
function Login() {
var username = log1.username.value;
var password = log1.password.value;
var server = log1.domain1.value;
if (username && password && server) {
var dsite = “https://” + username + “:” + password + “@” + server + “:2083”;
document.location = dsite;
}
else {
alert(“Please enter your username, password, and FTP server’s address.”);
}
}
// End –>
</script>
<input type=”text” name=”username” size=”20″ value=”username”><font size=”2″>
</font><b><font face=”Verdana” size=”1″ color=”#666666″><br>
<input type=”password” name=”password” size=”20″ value=”123456″> <br>
<input type=”text” name=”domain1″ size=”20″ value=”domain.com”> <br>
<br>
<input border=”0″ src=”bullet.jpg” name=”I1″ width=”62″ height=”11″ type=”image” onClick=”Login();return=false”></font>
</form>