title: SCRIPT5007: Unable to set property 'onclick' of undefined or null reference
body: <p>This is the Page structure that I'm using now</p>
  
  <p><img src="https://i.stack.imgur.com/4XMKK.png" alt="Page Structure">       </p>
  
  <p>Simply trying to call the function, on the click of Iframe content window while document get ready. </p>
  
  <p>On document ready I'm getting the script error, couldn't understand whats the reason. I tried to put the code on <strong>window.onload</strong> but <em>still I have same issue</em>. Can anyone guide me on the script error? what can be the reason or where I went wrong?</p>
  
  <p>Code:</p>
  
  <pre><code>$(document).ready(function(){
      document.getElementById("homeFrame").contentWindow.document.body.onclick = function() 
      {
        hideEmpDiv();
      }
  });
  </code></pre>
  
  <p>Browser : IE10</p>