L
libsfan01
Hi all
I want to have create a js function to use xmlhttprequest continously
check a given url for any change in its value and then bring the
contents of that page through.
Here is my code so far, it just pulls is through once when the function
is called, i would like it to work continuously:
function getdata() {
get = new XMLHttpRequest();
get.onreadystatechange = processdata;
get.open("GET", "data_page.xml");
get.send(null);
}
function processdata() {
if (get.readyState == 4) {
data = get.responseText;
document.getElementById("display").value = data;
}
}
Thanks
Marc
I want to have create a js function to use xmlhttprequest continously
check a given url for any change in its value and then bring the
contents of that page through.
Here is my code so far, it just pulls is through once when the function
is called, i would like it to work continuously:
function getdata() {
get = new XMLHttpRequest();
get.onreadystatechange = processdata;
get.open("GET", "data_page.xml");
get.send(null);
}
function processdata() {
if (get.readyState == 4) {
data = get.responseText;
document.getElementById("display").value = data;
}
}
Thanks
Marc