title: IE6 can't find Object element with getElementById()?
body: <p>I'm trying to get an object element from my webpage using getElementById (ultimately so I can replace it with a dynamically created object element) but it is returning <code>null</code> in IE6.</p>
  
  <p>In the following code, the <code>byId()</code> function returns <code>null</code> in IE but an <code>[object HTMLObjectElement]</code> in Firefox 3 and the <code>lengthOfByTagName()</code> function returns <code>0</code> in IE but <code>1</code> in Firefox.</p>
  
  <p>Is there something I am doing wrong?</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;IE doesn't see Object element?&lt;/title&gt;
  &lt;script type="text/javascript"&gt;
  function byId()
  {
      var video = document.getElementById("VideoPlayer");
      alert(video);
  
  }
  function lengthOfByTagName()
  {
      var length = document.getElementsByTagName("object").length;
      alert(length);
  
  }
  &lt;/script&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
      &lt;object type="" id="VideoPlayer"&gt;
          &lt;param name="allowScriptAcess" value="always" /&gt;
          &lt;param name="allowfullscreen" value="true" /&gt;
          VideoPlayer element
      &lt;/object&gt;
      &lt;br&gt;
      &lt;br&gt;
      &lt;a href="#" onclick="javascript:byId()"&gt;getElementById("VideoPlayer")&lt;/a&gt;
      &lt;br&gt;
      &lt;a href="#" onclick="javascript:lengthOfByTagName()"&gt;getElementsByTagName("object").length&lt;/a&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>