[thelist] javascript question

Tom Dell'Aringa pixelmech at yahoo.com
Wed Sep 24 13:44:51 CDT 2003


--- Gary Carlsonwrote:
> What is the simplest way to prevent a carriage return from
> submitting a form, forcing the submit button to be the only submit.
> Digest mode.....please off list also.

function SuppressEnter(e) 
{
	if(event.keyCode==13) return false;
}

document.onkeydown = SuppressEnter;

This is only tested in IE6, don't have the time right now to do
anything else but used it on an IE only project. 

HTH

Tom


More information about the thelist mailing list