title: why some time javascript work on mozilla but not IE
body: <p>I have question why sometime javascript work properly on <code>mozilla</code> but in case of <code>Internet Explore</code> it not work.What the issues here
  Is there any that I need to add in my javascript
  Please reply if any body know.I have created a very small javascript but it nis not working on IE.</p>
  
  <p><strong>code</strong></p>
  
  <pre><code>       &lt;script language="javascript"&gt; 
             function toggle(divid) {
                  //alert(divid);
                   var ele = document.getElementById("toggleText");
                   var text = document.getElementById(divid);
                   var innerhtml= document.getElementById(divid).innerHTML;
                   //alert(innerhtml);
            if(ele.style.display == "block") 
               {
          ele.style.display = "none";
      text.innerHTML = document.getElementById(divid).innerHTML;
          }
             else {
      ele.style.display = "block";
      text.innerHTML = document.getElementById(divid).innerHTML;
             }
                            } 
           &lt;/script&gt;
            &lt;div id="container"&gt;&lt;embed height="450" width="450" wmode="transparent"  type="application/x-shockwave-flash" src="http://www.youtube.com/v/sIFYPQjYhv8&amp;amp;rel=0&amp;amp;color1=0x2b405b&amp;amp;color2=0x6b8ab6&amp;amp;border=1"&gt;&lt;/div&gt;
     &lt;?php for($i=0;$i&lt;=2;$i++)
              { 
    ?&gt;
          &lt;div id="displayText&lt;?php echo $i; ?&gt;" onClick="javascript:toggle(this.id);"&gt;&lt;embed height="150" width="150" wmode="transparent" type="application/x-shockwave-flash" src="http://www.youtube.com/v/sIFYPQjYhv8&amp;amp;rel=0&amp;amp;color1=0x2b405b&amp;amp;color2=0x6b8ab6&amp;amp;border=1"&gt;&lt;/div&gt;
        &lt;div id="toggleText" style="display: none"&gt;change inner html&lt;/div&gt;
         &lt;?php } ?&gt;
  </code></pre>
  
  <p>Thanks</p>