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

Synchronous No
Bubbles No
Cancelable No

 

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.
    VB Object 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.
    VB String expression that evaluates to the URL to which the browser is navigating.
  • Flags [in, ref]

    C++
    VB Reserved. 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.
    VB String 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.
    VB Data 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.
    VB Value 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.
    VB Boolean 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.