Partager via


Handler Code Tab, Pane Customization Dialog Box

The Handler Code tab specifies handlers to hyperlinks that are selected in a pane when the pane type is XML or HTML, and the hyperlink begins with vfps:. For example, the following code opens a browser window to the specified URL:

<a href="vfps:linkto?url=https://msdn.microsoft.com/vfoxpro/">Go to the VFP site</a>

The following table lists default handlers built into the Task Pane Manager.

Default handler Description

vfps:refresh

Reloads the current pane.

vfps:linkto

Opens a browser window to the specified URL. The URL is specified with the url=cURL parameter.

vfps:gotopane

Switches the Task Pane Manager to the specified pane. The pane is specified with the uniqueid=cPaneUniqueID parameter.

vfps:help

Displays the specified Help by topic or ID. The Help is displayed by using the ID=cTopicID or Topic=cTopicName parameters.

vfps:options

Displays the Task Pane Options dialog box for the specified pane. The pane is specified with the uniqueid=cPaneUniqueID parameter.

vfps:message

Displays an informational message box. The message is specified with the msg=cMessage parameter.

You can include the refresh parameter with any handler code so that the pane reloads immediately after the handler is called. This is useful when the result of the link might affect the pane's content. You can use the refresh parameter with other parameters as shown in the following example:

vfps:message?msg=This is a message&refresh

The following table lists the parameters passed to the code when you use custom handler code.

Parameter Description

cAction

Specifies the action, which is the text following vfps: but preceding any parameters. For example, the following specifies to use a custom handler called MyAction:

<a href="vfps:MyAction?Param=Value">This is my handler</a>

oParameters

A collection of the specified parameters. Additionally, if this is a form submit, the collection also includes the form values. To retrieve a value, call the GetParam( ) function with the parameter name as shown in the following example:

oParameters.GetParam("ParameterName")

oBrowser

Contains the object reference to the Window object in the browser control on the pane. You can use this to access DHTML methods and properties. For example:

oBrowser.document.all("SearchResults").style.display = "none"

oContent

Contains a reference to the pane content definition so you can retrieve option values and the PaneCache folder specified in the Task Pane Options dialog box. This is the same object that is passed into a script on the Data Tab, Pane Customization dialog box.

  • Modify
    Opens a window to edit the handler code.
  • Edit Box
    Displays the handler code.

See Also

Reference

Pane Customization Dialog Box
Task Pane Manager