Loading ...
Sorry, an error occurred while loading the content.

Re: [ydn-javascript] Displaying Image using Ajax in IE6

Expand Messages
  • Philip Tellis
    ... umm, the standard way to change an image s src is to set its .src property: document.getElementById( imageSrc ).src = ajaxObj.responseText; Also, that ./
    Message 1 of 3 , Dec 27, 2006
    • 0 Attachment
      Sometime Today, govindaraj assembled some asciibets to say:

      > I have done like the following method
      >
      > ...
      > // ajaxObj.responseText is './images/userimg.jpg'
      > document.getElementById('imageSrc').innerHTML = ajaxObj.responseText;

      umm, the standard way to change an image's src is to set its .src
      property:

      document.getElementById('imageSrc').src = ajaxObj.responseText;

      Also, that ./ in the responseText will make it a local file, ie, it will
      only work on the computer that actually has the image (your computer)
      and not on anyone else's computer. You need to pass in a full (absolute
      or relative) url.
    Your message has been successfully submitted and would be delivered to recipients shortly.