Sure Curly, the ajaxVWSwxf.js can be modified to pull just the data.txt file.
I'd suggest you copy the basic code from the ajaxGetUnits function (which runs once when the script loads) and rename it to ajaxGetDataTxt like this // ------------------------------------------------------------------------------------------
// function.. read data.txt and and decode values .. run once
// ------------------------------------------------------------------------------------------
function ajaxGetDataTxt(url) {
// read the data.txt file and set up all-time records
// This routine is run once at startup (load of page)
if (document.getElementById) {
var x = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest(url);
}
if (x) { // got something back
x.onreadystatechange = function() {
try { if (x.readyState == 4 && x.status == 200) { // Mike Challis added fix to fix random error: NS_ERROR_NOT_AVAILABLE
var data = x.responseText.split(','); // assuming comma-delimited format
// put stuff to decode your data.txt file here.
// variables as data[n] based on above split
//
// like:
// set_ajax_obs("ajaxtemprecord",data[0]);
//
// --- end of processing data[n] values
x.abort();
// } // END if(wunits[0]
} // END if (x.readyState == 4 && x.status == 200)
} // END try
catch(e){ } // Mike Challis added fix to fix random error: NS_ERROR_NOT_AVAILABLE
} // END x.onreadystatechange = function() {
x.open("GET", url, true);
x.send(null);
// alert("did Open and send of null");
}
} // end ajaxGetDataTxt function
Insert var wflashDataTxt = './data.txt'; // relative path to data.txt file
in the settings area near the top of the script, then near the bottom ot the script replace // Start the pair of AJAX loaders .. they'll reinvoke themselves
ajaxLoaderVWSf(wflashFile + '?' + new Date().getTime());
ajaxLoaderVWSf2(wflashFile2 + '?' + new Date().getTime());
to // Start the pair of AJAX loaders .. they'll reinvoke themselves
ajaxLoaderVWSf(wflashFile + '?' + new Date().getTime());
ajaxLoaderVWSf2(wflashFile2 + '?' + new Date().getTime());
ajaxGetDataTxt(wflashDataTxt + '?' + new Date().getTime());
That should allow you an easy way to get data.txt once, decode the values (you have to fill in those functions as shown above), and update what you'd like on the webpage.
Best regards,
Ken