I have seen several examples of how to load a file with javascript, however most of those examples use the data from the file to display it in a html.
I need to keep accessing a file since the file keeps updating and use those values in javascript as variables.
I got the closest with this,
function test() {
$().ready(function(){
var url = 'output.txt';
$.get(url, function(data) {
// can use 'data' in here...
console.log(data);
});
});
}
It logs document to the console and I can collapse that.
There is really a lot of stuff (to much to list here). I only don't know in what kind of format it needs the data to be or how to access it. I do see stuff about xml-stylesheet, so can i even use this?
Changing the way I write the file is no problem for me.
$.get...in a loop work?