title: Internet Explorer and the case of the Very Strange iFrame behaviour
body: <p>I'm having a truly... <em>bizzare</em> error in none other than Internet Explorer with a windowing system I'm developing. Basically, the windows are absolutely positioned divs containing ah iFrame that shows their page and resizes along with them. In all other browsers this works fine as intended, but in IE the iFrame doesn't show up... properly.</p>
  
  <p>My original code for spawning a new window looks like this:</p>
  
  <pre><code>function spawnNewWindow(url, title, type)
  {
      //Does another window with that particular type already exist?
      //If so, just point it at the new link without actually spawning a new window.
      var cancelSpawn = false;
      if ( $('.windowType_'+type).length )
      {
          //Update the SRC attribute for the iframe contained within the window. This should effectively
          //reload the window too.
          $('.windowType_'+type).children("iframe").attr("src", "/darknova4/"+url);
      } else {
  
  
      //First, create the window
      $("body").append(
      "&lt;div class='window'&gt; \
      &lt;div class='resizeArea'&gt;&lt;/div&gt; \
      &lt;div class='titlebar'&gt;"+title+"&lt;/div&gt; \
      &lt;div class='closeWindow'&gt;&lt;/div&gt; \
      &lt;div class='windowContent newspawn'&gt;&lt;iframe src='/darknova4/"+url+"' frameborder='0' width='100%' height='100%' scrolling='auto'&gt;&lt;/iframe&gt;&lt;/div&gt; \
      &lt;/div&gt;");
  
      //Move this window to the top of the stack
      $(".newspawn").parent(".window").css("z-index", windowZIndex++);
  
      //Set the data for this window's type, will be used to prevent copy windows being open later
      $(".newspawn").addClass("windowType_"+type);
  
      //Set up the window for moving and resizing and other stuff
      setupWindows();
  
      //Finally, remove the "newspawn" flag from the window, since it has content and we don't need work with it anymore.
      $(".newspawn").removeClass("newspawn");
  
      }
  }
  </code></pre>
  
  <p>On Internet Explorer, this produces a blank white window, which indicates an invisible iFrame since all of my windowed pages have a black background. I suspected the famous (and still not quite fixed) z-index bug, so I made the following change to play with the stacking order and see if I could find a quick-fix:</p>
  
  <pre><code>$("body").append(
  "&lt;div class='window'&gt; \
  &lt;div class='resizeArea'&gt;&lt;/div&gt; \
  &lt;div class='titlebar'&gt;"+title+"&lt;/div&gt; \
  &lt;div class='closeWindow'&gt;&lt;/div&gt; \
  &lt;div class='windowContent newspawn'&gt;&lt;iframe style='position: relative;' src='/darknova4/"+url+"' frameborder='0' width='100%' height='100%' scrolling='auto'&gt;&lt;/iframe&gt;&lt;/div&gt; \
  &lt;/div&gt;");
  </code></pre>
  
  <p>Note the relative position, which <em>should</em> be default for objects, but isn't because of the stacking bug. What happens with this code is, the windows shows up, the iFrame shows up, and all looks good, until you try to use it. I can't explain why, but <strong>Mousing Over the iFrame</strong> causes it to <em>disappear</em>. I have no code on the site tied to the mouse move event, and no code on the iFrame's pages that would cause it to do anything on mouseover. It's really weird. Does anyone have a clue as to why it might be behaving this way?</p>
  
  <p>If you need to see this behavior for yourself, I've already got a test of the system implemented at www.darknovagames.com, which works fine in firefox, but as mentioned is really bizzare in IE. I can post more code if you think it will help, but this is where I think the error is. Namely, I'd be happy to post the CSS on the parent window and the JavaScript for my mouse events, etc.</p>
  
  <p>Thanks to anyone who can provide some insight on this strange behavior. </p>