Export (0) Print
Expand All

BeforeNavigate event

Fires before navigation occurs in the given object (on either a window or frameset element).

Syntax

HTML Attribute <element BeforeNavigate = "handler(event)">
attachEvent Method object.attachEvent("BeforeNavigate", handler)

 

Event information

SynchronousNo
BubblesNo
CancelableNo

 

Event handler parameters

pDisp [in]
C++A pointer to the Object interface for the WebBrowser object that represents the window or frame. This interface can be queried for the IWebBrowser2 interface.
VBObject that evaluates to the top level or frame WebBrowser object corresponding to the navigation.
url [in, ref]
C++A pointer to a Variant structure of type String that contains the URL to be navigated to.
VBString expression that evaluates to the URL to which the browser is navigating.
Flags [in, ref]
C++
VBReserved. Set to zero.
TargetFrameName [in, ref]
C++A pointer to a Variant structure of type String that contains the name of the frame in which to display the resource, or Null if no named frame is targeted for the resource.
VBString expression that evaluates to the name of the frame in which the resource will be displayed, or Null if no named frame is targeted for the resource.
PostData [in, ref]
C++A pointer to a Variant structure of type VT_BYREF|VT_VARIANT that contains the data to send to the server, if the HTTP POST transaction is used.
VBData to send to the server if the HTTP POST transaction is being used.
Headers [in, ref]
C++A pointer to a Variant structure of type String that contains additional HTTP headers to send to the server (HTTP URLs only). The headers can specify information, such as the action required of the server, the type of data being passed to the server, or a status code.
VBValue that specifies the additional HTTP headers to send to the server (HTTP URLs only). The headers can specify such things as the action required of the server, the type of data being passed to the server, or a status code.
Cancel [in, out, ref]
C++A pointer to a Variant structure of type Boolean that contains the cancel flag. An application can set this parameter to True to cancel the navigation operation, or to False to allow the navigation operation to proceed.
VBBoolean value that the container can set to True to cancel the navigation operation, or to False to allow it to proceed.

Remarks

This event is obsolete. Use the BeforeNavigate2 event instead.

See also

InternetExplorer
WebBrowser

 

 

Community Additions

ADD
Show:
© 2015 Microsoft