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

Re: $_FILES empty when using connection manager to upload an image

Expand Messages
  • Nick Weavers
    I hope folks won t mind me taking a bit of a liberty here... but my next problem related to this post in that it follows on from the ajax image upload I now
    Message 1 of 8 , Dec 14, 2006
    • 0 Attachment
      I hope folks won't mind me taking a bit of a liberty here... but my
      next problem related to this post in that it follows on from the ajax
      image upload I now have working.

      When I upload the image it goes into a file that may overwrite one
      that already exists and is also in the browser cache. When the
      YAHOO.util.Connect.asyncRequest completes and the upload callback is
      triggered, it calls the following function to reload the image:

      function reloadImage(user) {
      var now = new Date();
      var imageObj = document.getElementById('uploaded_image');
      // Adding the current time to the URO should cause a cache update
      imageObj.src = 'mysite/images/' + user + '.jpg?' + now.getTime();

      var msgDiv = document.getElementById('msgDiv');
      msgDiv.innerHTML += "<br>imageObj.src: " + imageObj.src;
      //setTimeout('reloadImage()',10000);
      }

      The value of imageObj.src is written to div for checking and I can
      see that it is correct and yet the image does not reload. Can anyone
      tell me what I am missing?

      TIA,
      Nick
    Your message has been successfully submitted and would be delivered to recipients shortly.