Example: UploadControl

Purpose:
This example uses IntegralFTP to create an FTP/FTPS/SFTP upload control that looks similar to those used in e-mail web-apps for uploading attachments.
Instructions:
Enter the domain-name and login details of an FTP server that and press 'Upload File'. Try uploading multiple files at once.
FTP parameters:
These parameters can be set using Javascript and are only shown here for demonstration purposes.
If you don't have upload-permission on any FTP servers then you may like to install the 30-day trial of CompleteFTP.
Server:
User-name:
Password:
Server directory:
Upload control:
Note that, unlike other FTP upload controls, the visual component is pure HTML/Javascript.
Unlike non-Java-based FTP upload control, it allows selection of multiple-files.
This means they can be styled using CSS and adapted by modifying the Javascript source-code.

Source:
<div id="MyUploadControl"></div>
.
.
.
// attach the EdtUploadControl class to the div above.
var uploadControl = new EdtUploadControl("MyUploadControl");

// render the HTML control-elements inside the div
uploadControl.render();

// handle the onClick event so that we can set the login details
uploadControl.onClick = function() {
    // set login details using values entered in the form above
    this.setRemoteHost(document.getElementById("Server").value);
    this.setUserName(document.getElementById("UserName").value);
    this.setPassword(document.getElementById("Password").value);
    this.setInitialRemoteDirectory(document.getElementById("Directory").value);
}