Hi Essential,
Thank you very much for your time and your code

But I'm sorry to say that this time it doesn't work for me

I'm still submitting the form.
Firstable, I copied your code to an empty web page and tried it but he form was submitted.
Then I tried to included it in the real page I would like to fix and after many changes and trials still didn't stop the form from submitting.
It is possible to just ignore the "enter key" in a single input field or it is necessary to block the whole form from submitting?
By the way, I'm using something like this code:
var form = ( "form" in document ) ? form : document.getElementsByTagName("form").item(1);//second form tag=item(1)
in order to select the form because it doesn't have any "name" or "id".
I hope that is not the cause for not working.
Also here I left you some code of my webpage's form in case:
<div id="register-box">
<h2>Register</h2>
<form action="http://mywebpage/action/register" method="POST" >
And an example of one or my input fields within the form:
<label>Username<br/>
<input type="text" name="username" value="" class="general-textarea"/>
None of those can be change beforehand, the only way to select them and to modify its behavior it is with scripting.