SetOutlineJavaScriptA

JavaScript, Outlines

Description

The trailing A denotes the ANSI (char) DLL entry point; the ActiveX/COM surface exposes only the Unicode form. Behaviour is identical to SetOutlineJavaScript and string arguments are interpreted using the current SetAnsiMode code page

Specifies the JavaScript to run when the user clicks on the outline item (bookmark).

Syntax

Delphi

Function DLSetOutlineJavaScriptA(InstanceID, OutlineID: Integer; JavaScript: PAnsiChar): Integer;

DLL

int DLSetOutlineJavaScriptA(int InstanceID, int OutlineID, const char * JavaScript);

Parameters

OutlineIDThe ID of the outline as returned by the NewOutline function. Alternatively, use the GetOutlineID function to get a valid outline ID.
JavaScriptThe JavaScript to execute.

Return values

0The OutlineID was invalid
1The JavaScript action was successfully added to the outline ID