RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
SHDocVw.TWebBrowserBeforeNavigate2 Type

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

Pascal
TWebBrowserBeforeNavigate2 = procedure (ASender: TObject; const pDisp: IDispatch; var URL: OleVariant; var Flags: OleVariant; var TargetFrameName: OleVariant; var PostData: OleVariant; var Headers: OleVariant; var Cancel: WordBool) of object;
C++
(ASender: TObject; const pDisp: IDispatch; var URL: OleVariant; var Flags: OleVariant; var TargetFrameName: OleVariant; var PostData: OleVariant; var Headers: OleVariant; var Cancel: WordBool) ( TWebBrowserBeforeNavigate2)();

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. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!