title: Global function is not a function in latest browsers Microsoft Edge & Chrome
body: <p>The following code works fine in my IE-10 but does not work in Chrome and Edge browsers. Any pointers will be appreciated.</p>
  <p>form.jsp</p>
  <pre><code> &lt;div id=&quot;myDiv&quot;&gt;
      &lt;iframe id=&quot;iframeId&quot; name=&quot;theIframe&quot;  src=&quot;&quot; frameborder=&quot;0&quot; marginwidth=&quot;10&quot; marginheight=&quot;20&quot; scrolling=&quot;auto&quot; width=&quot;100%&quot; height=&quot;100%&quot;&gt;
      &lt;/iframe&gt;   
  &lt;/div&gt;
  </code></pre>
  <p>submit element in the form.JSP</p>
  <pre><code>&lt;div id=&quot;submitButton&quot;&gt;
      &lt;input id=&quot;vButton&quot; type=&quot;button&quot; name=&quot;PullReport&quot; value=&quot;Submit Me&quot; onClick=&quot;document.theIframe.submitReport();&quot;/&gt;
  &lt;/div&gt;
  </code></pre>
  <p>myfunc.js</p>
  <pre><code>function submitReport () {
  //this works
  }
  </code></pre>
  <p>Error :
  at this line <code>document.theIframe.submitReport()</code></p>
  <pre><code>&gt; Uncaught TypeError: document.theIframe.submitReport() is not a
  &gt; function
  </code></pre>