Hi,
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:
<script language="javascript" type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js"></script>
<textarea id='first'></textarea>
<textarea id='second'></textarea>
<script>
jQuery("#first").keydown(function(event)
{
var keydown = jQuery.Event("keydown")
keydown.keyCode = event.keyCode
keydown.which = event.which
jQuery("#second").trigger(keydown)
})
</script>
Any ideas how could I achieve that?