try changing the onkeyup event on the input to return the function result
so in the onkeypress event:
<input type="text" name="myInput" id="myInputField" size="22" onkeypress="return dontSubmit(event);" />
and then the JS:
function dontSubmit (event)
{
if (event.keyCode == 13) {
return false;
}
}