javascript - How to: Place TXT File's Content (from FTP Server) in HTML5 Document -


i trying content of txt file (located on ftp server) place in html5 document. unfortunately, know how read txt file selecting dialog. of know how set content of txt file, located on ftp server?

something like:

<div src="ftp://john-doe.com/ordner/unterordner/txtfile1.txt" /> 

here content far:

<body> <input type="file" id="files" name="files[]" multiple /> <output id="list"></output> <script>     function handlefileselect(evt) {         var files = evt.target.files;          (var = 0, f; f = files[i]; i++) {             var reader = new filereader();             reader.onload = (function (thefile) {                 return function (e) {                     var span = document.createelement('span');                     span.innerhtml = ['<p>', e.target.result, '</p>'].join('');                     document.getelementbyid('list').insertbefore(span, null);                 };             })(f);              reader.readastext(f, "utf-8");             reader.readastext(f);         }     }     document.getelementbyid('files').addeventlistener('change', handlefileselect, false); </script> 


Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -