javascript - changing the content of .txt file - on browsing file -
i want draw structure of chemicals based on values in log file . write javascript drawing , works predefined x,y,z coordinates value
.txt file contain
its 5th,6th,7th indicates x,y,z coordinates value.
log file contain following fields
is there way browse file user , accept value in 5th,6th,7th field of .txt file.
to file uploaded check out kk anu's answer.
once have file in access , can read it, it's straight forward iteration of each line.
var linesfromfile= file.split(/[ ,]+/); linesfromfile.foreach(function(entry) { var parsedfloat = parsefloat(entry); if(parsedfloat === number(parsedfloat) && parsedfloat%1!==0){ // parsed float } });
you have adapt code needs, function go with.
Comments
Post a Comment