You can think of stopPropagation. http://www.w3.org/TR/DOM-Level-3-Events/events.html#Events-flow I hope this might help you. On Sat, Oct 18, 2008 at 11:26 PM, Ryan Hullah <[EMAIL PROTECTED]> wrote:
> > I've thought of that, but I'm not sure that would work for me. I only > want a sub section of input textboxes and certain input buttons within > that sub section to prevent the form submit on the Enter button. So > if I did it on the form submit event, I'd need to know who caused the > submit and whether or not to cancel it. My sample was simpler that my > real world form for the purpose of the question. If it's not as hard > as I'm thinking it is, please explain. > > On Sat, Oct 18, 2008 at 6:08 AM, Prajwala Manchikatla > <[EMAIL PROTECTED]> wrote: > > instead of using preventDefault for the input, submit buttons use it for > the form.submit event. That means write a event handler for onsubmit event > of form and in that handler use preventDefault. It will work. We also had a > same requirement. It solves the problem. >