title: Is it possible to embed a SWF in a form using swfobject 2+ in IE6+?
body: <p>I've been having endless problems embedding a dynamically loaded SWF into a HTML Form within IE 6,7,8 using swfobject.embedSwf.</p>
  
  <p>All the proposed manual workarounds for the problem involve creating a reference to the Object DOM element from the window object. For example:</p>
  
  <pre><code>window[id] = document.getElementById(id);
  </code></pre>
  
  <p>Where id is the id of the swf object dom element. In my case I cannot set <code>window[id]</code> to the swf object id because it hasn't been created yet!</p>
  
  <p>The line in swfobject that's causing the javascript errors is:</p>
  
  <pre><code>el.outerHTML = '&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '&gt;' + par + '&lt;/object&gt;';
  </code></pre>
  
  <p>As the SWF movie sets up its Javascript external interface it tries to access window[id]. Since this doesn't exist, it fails.</p>
  
  <p>If I apply the workaround mentioned above and populate <code>window[id]</code> with the DOM element that's being replaced by embedSwf it still fails beacuse it's trying to call Flash specific methods on a div DOM element rather than an object DOM element.</p>
  
  <p>I find it amazing that this problem hasn't been fixed since Flash 8 and IE6!</p>