Calling javascript function in iframe
<p>I have problem calling a javascript function in an iframe from the parent page. Here is my two pages:</p>

<p><strong>mainPage.html</strong></p>

<pre><code>&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;MainPage&lt;/title&gt;
    &lt;script type="text/javascript"&gt;
     function Reset() 
     {
      if (document.all.resultFrame)
       alert("resultFrame found");
      else
       alert("resultFrame NOT found");

      if (typeof (document.all.resultFrame.Reset) == "function")
       document.all.resultFrame.Reset();
      else
       alert("resultFrame.Reset NOT found");
     }
    &lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
    MainPage&lt;br&gt;
    &lt;input type="button" onclick="Reset()" value="Reset"&gt;&lt;br&gt;&lt;br&gt;
    &lt;iframe height="100" id="resultFrame" src="resultFrame.html"&gt;&lt;/iframe&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p><strong>resultFrame.html</strong></p>

<pre><code>&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;ResultPage&lt;/title&gt;
    &lt;script type="text/javascript"&gt;
     function Reset() 
     {
      alert("reset (in resultframe)");
     }
    &lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
    ResultPage
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>(I know that <code>document.all</code> isn't recommended but this page should only be viewed with IE internally and I don't think that's the problem)</p>

<p>When I press the Reset-button I get "resultFrame found" and "resultFrame.Reset NOT found". It seems to have a reference to the frame but can't call the function on the frame, why is that?</p>
