Menu
im trying to make a login page for my ftp server that uses the ftp browser in internet explorer. all i need it to do is have 2 text boxes(one for user name and one for password) and a go button, the format for the ftp login link is
[url]ftp://[/url][login]:[pw]@[site]:[port]
the script needs to fill in the login and pw fields. if you can help please respond or email me. or if you know another way to do this, anything would be helpfull
<i>
</i>
<!-- TWO STEPS TO INSTALL FTP SERVER LOGIN:
1. Copy the coding into the HEAD of your HTML document
2. Add the last code into the BODY of your HTML document -->
<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Reinout Verkerk -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! <a href="http://javascript.internet.com">http://javascript.internet.com</a> -->
<!-- Begin
function Login(form) {
// NOTE: the <a href="ftp://">ftp://</a> part is automatically added by the script, you do not need it below.
var server = "server-ftp-address.com";
// Do not edit below this point
var username = form.username.value;
var password = form.password.value;
if (username && password && server) {
var ftpsite = "ftp://" + username + ":" + password + "@" + server;
window.location = ftpsite;
}
else {
alert("Please enter your username, password, and FTP server's address.");
}
}
// End -->
</script>
</HEAD>
<!-- STEP TWO: Copy this code into the BODY of your HTML document -->
<BODY>
<center>
<form name=login>
<input type=hidden name=server value="ftp://yoursite.com" size=14>
<table width=250 border=0 cellpadding=3>
<tr>
<td colspan=2 align=center><b><h2>Logon to FTP Server!</h2></b></td>
</tr>
<tr>
<td>Username:</td>
<td><input type=text name=username size=20></td>
</tr>
<tr>
<td>Password:</td>
<td><input type=password name=password size=20></td>
</tr>
<tr>
<td colspan=2 align=center>
<input type=button value="Login!" onClick="Login(this.form)"></td>
</tr>
</table>
</form>
</center>
<!-- Terms say you have to leave ads in so.. -->
<p><center>
<font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>
<!-- Script Size: 1.53 KB -->
Well I am trying to get it to get the username and password to link to the [email protected]">ftp://unsername:[email protected] When I try it i just goes to the root folder instead of the fold I am trying to get it to. If you know an FTP site try it and you will see what i mean. But I have adjusted my FTP server to work with the simple address [email protected]">ftp://unsername:[email protected] adn i tested it from internet explorer and it works just fine. But when using the script it just goes directly to the ROOT site and not hte actualy directory I weant it to. I am thinking you may need to see it for yourself. But I am in the porcess of writing a different script that may do what I want. It would save me quite a few hours if I can just hve this one do what I want though.
Thanks[/QUOTE]
0.1.9 — BETA 4.29