title: Javascript sending key codes to a <textarea> element
body: <p>I can't figure out how to trigger a keydown event on a textarea element, e.g. imagine i have two textarea elements and when i type something in the first one, I want the second box to show the typing as well, but for a certain reason I have to do it via events. This is what I tried and it doesn't work:</p>
  
  <pre><code>&lt;script language="javascript" type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js"&gt;&lt;/script&gt;
  
  &lt;textarea id='first'&gt;&lt;/textarea&gt;
  &lt;textarea id='second'&gt;&lt;/textarea&gt;
  
  &lt;script&gt;
      jQuery("#first").keydown(function(event)
      {
          var keydown = jQuery.Event("keydown")
          keydown.keyCode = event.keyCode
          keydown.which = event.which
          jQuery("#second").trigger(keydown)
      })
  &lt;/script&gt;
  </code></pre>
  
  <p>Any ideas how could I achieve that?</p>