title: Disposing of a swfUpload instance
body: <p>I have a swfUpload instance that I want to make disapear after a succesful upload. I tried the destroy method but it caused a lot of javascript problems. So what I did is when the uploadSuccess event fires I get my div and set it's display to none. I then set the innerHTML of another div to show a thumbnail of the uploaded video. It works fine on every browser except internet explorer where it shows :</p>
  
  <p>Message :</p>
  
  <blockquote>
    <p>Exception thrown and not caught Line : 451 Character : 2 Code : 0
    URI : /js/swfupload/swfupload.js</p>
  </blockquote>
  
  <p>and the submit button of my form doesn't work.</p>
  
  <p>Here is the faulty function</p>
  
  <pre><code>SWFUpload.prototype.callFlash = function (functionName, argumentArray) {
  argumentArray = argumentArray || [];
  
  var movieElement = this.getMovieElement();
  var returnValue, returnString;
  
  // Flash's method if calling ExternalInterface methods (code adapted from MooTools).
  try {
      returnString = movieElement.CallFunction('&lt;invoke name="' + functionName + '" returntype="javascript"&gt;' + __flash__argumentsToXML(argumentArray, 0) + '&lt;/invoke&gt;');
      returnValue = eval(returnString);
  } catch (ex) {
      throw "Call to " + functionName + " failed";
  }
  
  // Unescape file post param values
  if (returnValue != undefined &amp;&amp; typeof returnValue.post === "object") {
      returnValue = this.unescapeFilePostParams(returnValue);
  }
  
  return returnValue;
  </code></pre>
  
  <p>};</p>
  
  <p>And the uploadSuccess event :</p>
  
  <pre><code>function uploadSuccess(file, serverData) {
  if (serverData != "")
  {
      this.uploadError(file, SWFUpload.UPLOAD_ERROR.HTTP_ERROR, serverData);
  }
  else
  {
      try {
          var progress = new FileProgress(file, this.customSettings.progressTarget);
          progress.setComplete();
          if (this.customSettings.langue == "fr")
          {
              progress.setStatus("Complété.");
          }
          else
          {
              progress.setStatus("Complete.");
          }
          progress.toggleCancel(false);
  
          document.getElementById("preview").innerHTML = "&lt;div id='cadre-image'&gt;&lt;input type='hidden' name='txtFichier' value='" + file.name + "'&gt;&lt;img id='imgPreview' src='images/thumbnailVideo.php?src=" + file.name + "&amp;save=true' /&gt;&lt;p&gt;" + file.name + "&lt;/p&gt;&lt;/div&gt;";
          document.getElementById("tdAjouter").innerHTML = "&lt;input type='submit' value='Ajouter' /&gt;";
          var divupload = document.getElementById("upload");
          divupload.style.display = "none";
  
      } catch (ex) {
          this.debug(ex);
      }
  }
  </code></pre>
  
  <p>}</p>