javascript nested callback-functions return -


how can return value evt.target.result function? or there way better?

thanks lot

function datei_lesen(datei){     filesystem.root.getfile(datei, null, function(fileentry){           fileentry.file(function(file){              var reader = new filereader();             reader.onloadend = function(evt) {                 return evt.target.result;                      };             reader.readastext(file);          }, function (evt) {     alert("2:"+evt.target.error.code);     });     }, function (evt) {     alert("1:"+evt.target.error.code); }); } 

no ideas here?

otherwise have use global variables


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -