How to response and image instead of responseText?
Hello, an http request is calling another page called test.php. And putting it all in an id called "countposts." I'm trying to pull an image from that page. So basically I'm just trying to call whats in the page, not any text at all. But I think there is something missing in the getelement by id, like a src. command or something. Anyone know how to take an image from a php page and stick it in an id? Whats missing in this get element so it puts an image in this id name? Please let me know, thank you very much.
You can't retrieve images using Ajax because the images are not text or XML and are not actually in the web page but are separate files that are referenced from the page.
set up an array of image filenames and then create a function that extracts one of the names from the array. Call the function from a setInterval call that specifies how often you want to download a new image.