I wish to load some additional data from javascript in an HTML page. The solution below is small and does exactly what I need to do in non-Microsoft browsers.
Question is, what is the Microsoft explorer equivalent? Note that the data I'm loading isn't in XML. I also do not wish to add a javascript library - I want this page to load fast even on dialup.
var client = new XMLHttpRequest();
client.open('GET', 'gamedata.txt');
client.onreadystatechange = function() {
if (client.readyState == 4) {
alert(client.responseText); // Make sure its loaded
}
}
client.send("");