Monday, 15 June 2015

xmlhttprequest - Javascript - read data from multiple files in sequence -


I have a function ReadFromFile that reads from a file on the server how do I get a function Write, which can read from multiple files on the server and save data from each file in different variables in the sequence?

Update Measurement Data from ReadFromFile (filename) {if (window.XMLHttpRequest) {// code for IE7 +, Firefox, Chrome, Opera, Safari xmlhttp = New XMLHttpRequest (); } Else {// code for IE6, IE5 xmlhttp = new ActiveXObject ("Microsoft.XMLHTTP"); } Xmlhttp.onreadystatechange = function () {if (xmlhttp.readyState == 4 & xmlhttp.status == 200} {dataset_01 = xmlhttp.responseText;}} Xmlhttp.open ("GET", file name, true); Xmlhttp.send ();}


No comments:

Post a Comment