We have several forms on our web site. Recently we replaced the standard gray buttons with graphic buttons.

To make the 'submit' button work when the "Enter" key is pressed (as it does with the standard form buttons), we added the javascript function below. It is called with onKeyPress in the body tag.

NS4 = (document.layers) ? true : false;
function checkEnter(event)
{
var code = 0;
if (NS4)
code = event.which;
else
code = event.keyCode;

if (code==13) { document.forms[0].submit();
}


The code works fine for submitting the form. The only problem is that, whenever it is called (that is whenever you try to submit the form by pressing "Enter" when the focus is not already on the button), many of our machines let out the noisy "ding" that usually accompanies a warning message.

Any ideas on how we can get rid of the noise?