title: typeof fn == "function" but fn() not supported
body: <p>I unfortunately have to work on some code with involves heavy frameset manipulation.  I have one frame loading data via jQuery AJAX into another frame, like so:</p>
  
  <pre><code>var lookUpDiv = $("&lt;span /&gt;", top.frames["Main"].document)
  .attr("id", "lookUpDiv")
  .css({
     "background-color": "#ffffff",
     "margin": "10px",
     "overflow-y": "auto",
     "overflow-x": "hidden",
     "max-height": "100%",
     "display": (notIE8 ? "inline-block" : "inline"),
     "text-align": "center",
     "border-radius": "25px"
  })
  .text("Loading: Please Wait.")
  .load("associateLookup-1.asp")
  .appendTo(centeringDiv);
  </code></pre>
  
  <p>Among that data, there are a few functions being loaded.  I had a problem with them not being acessable to <code>top.frames["Main"]</code> but I solved that by declaring my functions as such:</p>
  
  <pre><code>var main = top.frames["Main"];
  
  main.closePopup = function () {
      alert("");
  }
  </code></pre>
  
  <p>This works in all the browsers I've tried except for ie8.  Unfortunately, most of our clients use ie8 so getting this to work is an absolute must.  I went into the js console and found some interesting results from tests:</p>
  
  <pre><code>top.frames["Main"].closePopup == {...}
  typeof top.frames["Main"].closePopup == "function"
  top.frames["Main"].closePopup()
  "Object doesn't support this property or method"
  </code></pre>
  
  <p>Does anyone kn ow why I can't call this function?</p>