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

Re: File Uploads in Safari

Expand Messages
  • taylorbarstow
    ... For the most part I agree, but I don t think it s Safari being more strict than the other browsers. appendChild is meant to work that way (the spec
    Message 1 of 5 , Jun 5, 2007
    • 0 Attachment
      > In your case, I suspect Safari is being strict in not allowing you to
      > append an element simply by getting a reference to it (e.g.,
      > document.getElementById), instead of actually copying it. In IE and
      > FF, your code:
      >
      > fileSubmitForm.appendChild(fileElement);
      >
      > produces a fileSubmitForm.elements.length of 1, which is the file type
      > input. However, in Safari, this returns 0. The appendChild()
      > operation was not successful.

      For the most part I agree, but I don't think it's Safari being more
      "strict" than the other browsers. appendChild is meant to work that
      way (the spec specifically indicates that if the element passed to
      appendChild is already in the tree, then it will be removed first - so
      this is a supported use case).

      The current release of Safari has known issues with dynamic forms, so
      I guess this really isn't a YUI bug at all.

      Thanks for the help,
      Taylor
    Your message has been successfully submitted and would be delivered to recipients shortly.