title: Iframe onclick not working in Firefox and Opera
body: <p>I am trying to attach an onclick event to an iframe that is in editable mode using the JavaScript and HTML code below. The code works fine in IE8, Safari, and Chrome, but does not work in Firefox or Opera. I have spent several hours doing some research, rewriting the code, and testing every idea that I can think of, all without success. So far, I have only been able to work out that line 8 might be the root of my problem. Can anybody tell me what I may be doing wrong and offer me any tips or code samples to help solve my problem? Any help would be appreciated.</p>
  
  <p>Here is my code;</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;script type="text/javascript"&gt;
      function iFrameOn(){
          document.getElementById("wysiwyg").contentWindow.document.designMode = 'On';
      }
      function iFrameEvent(){
          document.getElementById("wysiwyg").contentWindow.document.body.onclick = function(){
              alert('Hello world!');
          }
      }
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body onload="iFrameOn()"&gt;
  &lt;iframe name="wysiwyg" id="wysiwyg" onload="iFrameEvent()"&gt;&lt;/iframe&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>