SHDocVw.TWebBrowserBeforeNavigate2

From RAD Studio API Documentation
Jump to: navigation, search

C++

typedef void __fastcall (__closure *TWebBrowserBeforeNavigate2)(System::TObject* ASender, const _di_IDispatch pDisp, const System::OleVariant &URL, const System::OleVariant &Flags, const System::OleVariant &TargetFrameName, const System::OleVariant &PostData, const System::OleVariant &Headers, System::WordBool &Cancel);

Properties

Type Visibility Source Unit Parent
typedef public SHDocVw.hpp SHDocVw SHDocVw

Description

TWebBrowserBeforeNavigate2 is the type for the BeforeNavigate2 event handler on TWebBrowser.

Sender is the Web browser control that is about to look up a new URL.

pDisp is the Automation interface of the Web browser control specified by Sender.

URL is the Uniform Resource Locator of the resource the Web browser is looking up. Change this value to redirect the navigation operation to a different resource.

Flags is not currently used.

TargetFrameName is the name of the frame in which the resource will be displayed, or NULL if the resource should not be displayed in a named frame. Change this value to change where the resource is displayed. See the Navigate method for a list of possible values.

PostData contains the data sent to the server when the underlying operation is an HTTP post message. The event handler can change this value before it is sent to the target URL.

Headers contains any headers sent to the servers when the URL represents an HTTP message. HTTP headers specify such things as the intended action required of the server, the type of data, and so on. (See TWebRequest object, whose properties represent many of the more common headers). The event handler can change this value before it is sent to the target URL.

Cancel determines whether the Web browser looks up the specified resource after the event handler exits. Change Cancel to true to cancel the navigation operation.