Ciao a tutti , stò facendo una WEB PAGE in cui c ' è un FORM , andrà digitato USER e PASSWORD di un WEB SERVER e se corretti avviene la connessione ma qualcosa non funge in maniera corretta ! Vi prego di aiutarmi ! Grazie anticipate ! Premetto che non conosco molto lo JAVASCRIPT !
JAVASCRIPT
<!--
function login() {
var user = document.FileTransferProtocol.user.value;
var password = document.FileTransferProtocol.password.value;
else if ((user == "") || (user == "undefined")) {
alert("USER NOT FOUND");
document.FileTransferProtocol.user.focus();
}
else if ((password == "") || (password == "undefined")) {
alert("PASSWORD NOT FOUND");
document.FileTransferProtocol.password.focus();
}
else {
location.href = "ftp://" + user + "@" + password + ":" + "altervista.org";
}
}
//-->
Hyper Text Murkup Language
<HTML>
<HEAD>
<TITLE>LOGIN</TITLE>
</HEAD>
<BODY bgcolor="#000000" background="" text="#00FF00" link="#00FF00" alink="#00FF00" vlink="#00FF00">
<DIV align="center"><FONT size="10" color="#00FF00" face="Arial">FILE TRANSFER PROTOCOL</FONT></DIV>
<SCRIPT language="JAVASCRIPT" type="text/JAVASCRIPT" src="filetransferprotocol.js"></SCRIPT>
<form method="POST" name="FileTransferProtocol" action="">
<TABLE align="center" border="1" cellpadding="5">
<TR align="center">
<TD align="center" width="50%">
<DIV align="center"><FONT size="1" color="#00FF00" face="Verdana">USER</FONT></DIV>
</TD>
<TD align="center" width="50%">
<input type="text" name="user" size="25" tabindex="1">
</TD>
</TR>
<TR align="center">
<TD align="center" width="50%">
<DIV align="center"><FONT size="1" color="#00FF00" face="Verdana">PASSWORD</FONT></DIV>
</TD>
<TD align="center" width="50%">
<input type="password" name="password" size="25" tabindex="2">
</TD>
</TR>
<TR align="center">
<TD align="center" bgcolor="#CCCCCC" colspan="2">
<input type="button" name="LOGIN" value="LOGIN" style="font-family:Tahoma;font-size:10px;" tabindex="3" onClick="login()">
<input type="reset" name="RESET" value="RESET" style="font-family:Tahoma;font-size:10px;" tabindex="4">
</TD>
</TR>
</TABLE>
</form>
</BODY>
</HTML>

Rispondi quotando