Types TFormSubmitEvent and TbrFormSubmitEvent


THtmlViewer and TFrameViewer Declaration

TFormSubmitEvent = procedure(Sender: TObject; const Action,

Target, EncType, Method: string; Results: TStringList) of Object;

TFrameBrowser Declaration

TbrFormSubmitEvent = procedure(Sender: TObject; Viewer: THtmlViewer; const Action,

Target, EncType, Method: string; Results: TStringList; var Handled: boolean) of Object;

Description

The TFormSubmitEvent and TbrFormSubmitEvent types are the types for the OnFormSubmit event. This event occurs when the submit button of an HTML Form is depressed. The first four parameters are specified as attributes to the <form> tag in the HTML document.

Actionthe URL to which the form content is to be sent,

Targetthe destination frame

EncTypethe Mime type encoding for the Post Method

Methodthe HTTP method (GET or POST) for sending information.

Resultsis a TStringList representing the entries of the form's control elements. Entries in the TStringList are in the form:

NAME=VALUE

In general, NAME is the name attribute found in the control's tag and VALUE is either the value attribute or the field entry the user enters in the form's control.

Handled(TFrameBrowser only) Set Handled to True to prevent the default handling of the OnFormSubmit event. If Handled is not set to True, TFrameBrowser will handle the Form submission.

Note: The TStringList, Results, should be freed when the user is finished with the data unless Handled is False.

See also:

OnFormSubmit Event