Fires when a FORM is about to be submitted.
If the event bubbles and is cancellable, return VARIANT_TRUE to prevent the event from bubbling to other event handlers in the document tree. Return VARIANT_FALSE to allow bubbling.
The DISPID for this event is defined in mshtmdid.h. Use this value to identify the event handler when implementing IDispatch::Invoke.
Bubbles No Cancels Yes To invoke Submit a form using the INPUT TYPE=submit, INPUT TYPE=image, or BUTTON TYPE=submit object. Default action Causes a form to be sent to whatever location is stipulated in the ACTION attribute of the form object.
You can override this event by returning
falsein the event handler. Use this capability to validate data on the client side to prevent invalid data from being submitted to the server. If the event handler is called by the HTMLElementEvents4::onsubmit attribute of the form object, the code must explicitly request the return value using the return function, and the event handler must provide an explicit return value for each possible code path in the event handler function.
The IHTMLFormElement::submit method does not invoke the HTMLElementEvents4::onsubmit event handler.