Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
6.2k views
by (120 points)
Hi there,

Re. user-defined FTP login details, the Upload Control example page says 'These parameters can be set using Javascript and are only shown here for demonstration purposes.' However, I'm having a lot of trouble working out how I can pre-define the server address.

I'm very much a beginner when it comes to JavaScript so if anyone could tell me what I need to do I'd be very grateful. The Upload Control functonality is exactly what I'm after but I only want the users to be able to enter their username and password - the FTP server needs to be default.

Many thanks,

Dave

1 Answer

0 votes
by (51.6k points)
Hi Dave

I'm sorry, but I only just noticed your post. If you want support for our commercial products then it's best to e-mail us at support@enterprisedt.

Anyway, if you view the source of the UploadControl example, you'll see the following
code:
window.onload = function() {
   var uploadControl = new EdtUploadControl("MyUploadControl");
   uploadControl.render();
   uploadControl.onClick = function() {
     this.setRemoteHost(document.getElementById("Server").value);
     this.setUserName(document.getElementById("UserName").value);
     this.setPassword(document.getElementById("Password").value);
     this.setLogLevel("DEBUG");
     this.setInitialRemoteDirectory(document.getElementById("Directory").value);
   }
}


This shows that you can set the remote host as follows:
this.setRemoteHost("myhost@mydomain.com");


- Hans (EnterpriseDT)

Categories

...