Availability: |
| ||||||
Property/method value type: | Boolean primitive | ||||||
JavaScript syntax: | - | myObject.onsubmit = aHandler | |||||
HTML syntax: | <FORM onSubmit="..."> <HTMLTag onSubmit="..."> | ||||||
Argument list: | aHandler | A reference to a function object to handle the event |
As the <FORM> submit button is clicked, this event is triggered. If you return the value true, the event will be passed to the browser for further processing and the form will be submitted. Returning false inhibits this action and discards the message; the form will not be submitted. This provides a means of inhibiting <FORM> submits when the form data is bad.
You can later on call the submit() method to send the form content back to the server.
Note that the submit() method will not trigger an onSubmit event.
See also: | Event, Event handler, Event model, Event names, Event object, Event.returnValue, Handler, onClick, onMouseDown, onMouseUp, onReset, Semantic event |
Prev | Home | Next |
onStop | Up | onUnload |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |