title: Javascript: Event in iFrame
body: <p>I'm building a <code>WYISWYG</code> editor with an <code>iframe</code> with <code>designMode = 'on'</code>.</p>
  
  <p>The problem is that I can't use any event on the iframe in Firefox and Opera (IE untested), for example I would like to track the onkeyup event:</p>
  
  <pre><code>document.getElementById("myFrame").onkeyup = function(){
      doSomething...
  }
  </code></pre>
  
  <p>But doesn't works in the parent window.</p>
  
  <p>I tried in the iframe too with this:</p>
  
  <pre><code>top.frames[0].onkeyup = function(){
          doSomething...
  }
  </code></pre>
  
  <p>and all kind of stuff like these:</p>
  
  <pre><code>top.document.frames[0].onkeyup
  top.frames["myFrame"].onkeyup
  top.frames[0].document.onkeyup
  </code></pre>
  
  <p>But none of them wants to work so at the end turned out that even <code>window.onclick</code> doesn't works, so now I'm a bit confused...</p>
  
  <p>What's the solution for this?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>The problem seems to be with <code>document.designMode = "on"</code> in the iframe</p>