Click here to Skip to main content
Licence CPOL
First Posted 14 Jan 2004
Views 83,081
Downloads 1,621
Bookmarked 18 times

A Simple FTP Solution

By | 23 Oct 2008 | Article
This is a tiny utility to send or to bring files among your computer and your provider. See it in action: http://www.industriavirtual.com.br/codedemo/easyftp/index.htm If you find it useful, please vote!

Sample Image - easyftp.jpg

The HTML file

<html><head>
<link rel='stylesheet' href='ftp.css'>
<script language="'javascript'" src='ftp.js'></script>
<title>Easy FTP 1.0</title></head>

<body bgcolor='#ffffff'>
    <br><font class='title'><b>Easy FTP 1.0</b></font><hr>
    After connecting, you can drag'n drop files among the windows. 
    Left window is your local folder, right window is the remote folder.
    <p><table border='0' cellpadding='0' cellspacing='1' 
              align='center' width='98%'><form name=login>
        <tr><td class='brgtcell' align='right'>&nbsp;Username&nbsp;</td>
        <td class='darkcell'>&nbsp;<input type='text' 
          name='username' value='anonymous' size='20' 
          maxlength='20'>&nbsp;&nbsp;</td></tr>
        <tr><td class='brgtcell' align='right'>&nbsp;Password&nbsp;</td>
        <td class='darkcell'>&nbsp;<input type='text' 
          name='password' value='microsoft' size='20' 
          maxlength='20'>&nbsp;&nbsp;</td></tr>
        <tr><td class='brgtcell' align='right'>&nbsp;Server&nbsp;</td>
        <td class='darkcell'>&nbsp;<input type='text' 
          name='server' value='ftp.microsoft.com' size='60' 
          maxlength='120'>&nbsp;&nbsp;</td></tr>
        <tr><td class='brgtcell' align='right'>&nbsp;Local&nbsp;</td>
        <td class='darkcell'>&nbsp;<input 
          type='text' name='local' value='c:\' size='60' 
          maxlength='200'>&nbsp;&nbsp;</td></tr>
    </table>
    <hr><table border='0' cellpadding='0' cellspacing='0' width='100%'><tr>
    <td align='right'><input style='color:#000000' 
      type='button' value='Connect' onClick='Login(this.form)'></td>
    </tr></form></table> 
</body></html>

The JS File

function Login(form) {
    var username = form.username.value;
    var password = form.password.value;
    var server = form.server.value;
    var local = form.local.value;
    if (username && password && server && local) {
            window.open(local, '_blank', 
              'toolbar=yes,location=yes,status=yes,' + 
              'scrollbars=auto,copyhistory=no,menubar=no,width=' 
              + ((screen.AvailWidth/2)-12) + ',height=' + 
              (screen.AvailHeight-124) +',left=0,top=0,resizable=yes');
            window.open("ftp://" + username + ":" + 
              password + "@" + server, '_blank', 
              'toolbar=yes,location=yes,status=yes,' + 
              'scrollbars=auto,copyhistory=no,menubar=no,width=' 
              + ((screen.AvailWidth/2)-12) + ',height=' 
              + (screen.AvailHeight-124) +',left=' + ((screen.AvailWidth/2)) 
              + '),top=0,resizable=yes');
            }
        else {
            alert("NO BLANK FIELDS!");
            }
    }

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Industria Virtual

Web Developer
Industria Virtual
Brazil Brazil

Member

Follow on Twitter Follow on Twitter
Taylor made web applications for you and your business.

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralAnother FTP/Javascript solution Pinmemberh_c_a_andersen9:09 7 Nov '09  
GeneralMy vote of 1 PinmemberM_Menon1:21 22 Jun '09  
GeneralAccess Denied PinmemberNVRReddy0:15 16 Mar '07  
Generalproblem with the Articale PinmemberV.V.Thakur1:07 31 May '06  
Questionsupported browser ??? Pinmembermkcx0:49 10 Mar '04  
AnswerRe: supported browser ??? PinmemberMarcelo Franco5:35 10 Mar '04  
GeneralSample URL does not work PinmemberGerard Nicol10:56 16 Jan '04  
GeneralRe: Sample URL does not work PinmemberMarcelo Franco2:48 17 Jan '04  
GeneralRe: Sample URL does not work PinmemberGerard Nicol11:29 17 Jan '04  
GeneralRe: Sample URL does not work PinmemberMarcelo Franco4:02 18 Jan '04  
GeneralRe: Sample URL does not work PinmemberGerard Nicol10:52 18 Jan '04  
GeneralRe: Sample URL does not work PinmemberWeishun2:47 10 Nov '04  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web01 | 2.5.120528.1 | Last Updated 23 Oct 2008
Article Copyright 2004 by Industria Virtual
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid