title: can I catch exception of Iframe in parent window of Iframe
body: <p>I have an IFrame in a page and IFrame has some JavaScript. At run time JavaScript in IFrame gives exception which i want to catch on parent window. How to do that?</p>
  
  <pre><code>&lt;html&gt; 
  &lt;head&gt; 
  &lt;script type="text/javascript"&gt; 
  var frm123 = document.getElementById("frm123"); 
  frm123.contentWindow.onerror = function() { 
      alert('error caught'); 
  } 
  function loadData() { 
      var oRTE = document.getElementById("frm123").contentWindow.document;
      oRTE.open(); 
      oRTE.write(txt123.value);
      oRTE.close();
  } 
  &lt;/script&gt; 
  &lt;/head&gt; 
  &lt;body&gt; 
  &lt;input type="button" onclick="loadData();" value="load"&gt; 
  &lt;input type="text" id="txt123"&gt; 
  &lt;iframe id = "frm123" &gt; 
  &lt;/body&gt; 
  &lt;/html&gt;
  </code></pre>