AddGlobalJavaScriptA
Document properties, JavaScript
Description
The trailing A denotes the ANSI (char) DLL entry point; the ActiveX/COM surface exposes only the Unicode form. Behaviour is identical to AddGlobalJavaScript and string arguments are interpreted using the current SetAnsiMode code page
Adds JavaScript to a global location in the document
For example, this allows functions to be defined which can then be called from JavaScript attached to events
Syntax
Delphi
Function DLAddGlobalJavaScriptA(InstanceID: Integer; PackageName, JavaScript: PAnsiChar): Integer;
DLL
int DLAddGlobalJavaScriptA(int InstanceID, const char * PackageName, const char * JavaScript);
Parameters
| PackageName | The name to store the JavaScript under; If any JavaScript is already stored under this name it will be removed and the new JavaScript will be stored in its place |
|---|---|
| JavaScript | The JavaScript to store globally under the specified package name |
Return values
| 0 | The PackageName was empty |
|---|---|
| 1 | The JavaScript was stored successfully |