example.js
function(evt) {
    $('output').innerHTML = '';
    $('result').innerHTML = '';
    oMX.Init(); /* begin with new objects */
    fls = [];
    var cnt = 0;
    var files = evt.target.files; /* FileList object */
    for (var i = 0; i < files.length; i++) { /* loop the selected files */
      var reader = new FileReader();
      reader.onload = function(file) {
        fls[cnt + 1] = oMX.AddFile(file) ? true : false;  /* get a file */
        var c = $('result').innerHTML;
        if (c !== '') {
          c += ', ';
        }
        $('result').innerHTML = c + fls[cnt];
        cnt += 2;
      };
      fls.push(files[i].name, null);
      reader.readAsText(files[i]);
    }
  }
function(evt) {
    $('output').innerHTML = '';
    $('result').innerHTML = '';
    oMX.Init(); /* begin with new objects */
    fls = [];
    var cnt = 0;
    var files = evt.target.files; /* FileList object */
    for (var i = 0; i < files.length; i++) { /* loop the selected files */
      var reader = new FileReader();
      reader.onload = function(file) {
        fls[cnt + 1] = oMX.AddFile(file) ? true : false;  /* get a file */
        var c = $('result').innerHTML;
        if (c !== '') {
          c += ', ';
        }
        $('result').innerHTML = c + fls[cnt];
        cnt += 2;
      };
      fls.push(files[i].name, null);
      reader.readAsText(files[i]);
    }
  }
function ( evt ) { $ ( 'output' ) . innerHTML = '' ; $ ( 'result' ) . innerHTML = '' ; oMX . Init ( ) ; /* begin with new objects */ fls = [ ] ; var cnt = 0 ; var files = evt . target . files ; /* FileList object */ for ( var i = 0 ; i < files . length ; i ++ ) { /* loop the selected files */ var reader = new FileReader ( ) ; reader . onload = function ( file ) { fls [ cnt + 1 ] = oMX . AddFile ( file ) ? true : false ; /* get a file */ var c = $ ( 'result' ) . innerHTML ; if ( c !== '' ) { c += ', ' ; } $ ( 'result' ) . innerHTML = c + fls [ cnt ] ; cnt += 2 ; } ; fls . push ( files [ i ] . name , null ) ; reader . readAsText ( files [ i ] ) ; } }
FileList objects handler
@param {object} evt
FileList objects handler