You could use this script in the head section:
<SCRIPT LANGUAGE="JavaScript">
function dofunc(e)
{
if (document.all)
{
var keycodec = event.keyCode
}
else
{
var keycodec = e.which
}
if(keycodec=='13') // checks for ascii code for enter key
{
return false; // So IE does not submit form when you hit the enter key in a form field
}
}
</SCRIPT>
Then have your textarea tag like this:
<TEXTAREA ROWS="10" COLS="40" NAME="txta" onKeyDown="return dofunc(event)"></TEXTAREA>
The onKeyDown event seems to work better for both IE and NS where as the onKeyPress acts differently for both browsers.
Bookmarks