SitePoint Sponsor

User Tag List

Results 1 to 9 of 9

Threaded View

  1. #1
    SitePoint Addict
    Join Date
    May 2006
    Posts
    349
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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.

    function handleResponse() {

    if(http.readyState == 4 && http.status == 200){
    document.getElementById("countPosts")
    setTimeout('countPosts()',2000);
    }
    Last edited by 1Jen; May 7, 2007 at 04:24.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •