onkeyPress event with Intro key doesn't work on Firefox
Hello!!
I am having a problem on firefox.
I have an event (onkeyPress) on a textarea, which should trigger a function when the key pressed is Intro.
I would have the following on HTML:
HTML Code:
..
<textarea id="idtextarea" onkeyDown="showUser(this.value)"></textarea>
...
In Javascript:
[Javascript]
function showUser(this.value)
{
var keycode;
if(window.event) keycode = window.event.keyCode;
else if (e) keycode = e.which;
else return true;
if (keycode == 13)
{
...
[/Javascript]
It works on the main browsers but Firefox. Nothing happens on this browser.
I would appreciate any help.
Thank you very much.