ExecuteFormFieldScriptJSON
Formulieren, JavaScript-beveiliging
Beschrijving
Voert een field validation-, calculation-, formatting- of keystroke-action uit en geeft het resultaat en de event status als JSON terug. Hij stelt ExecuteFormFieldScriptEvent beschikbaar aan de DLL- en ActiveX-interfaces
Syntaxis
Delphi
Function TPDFlib.ExecuteFormFieldScriptJSON(Index, Action: Integer; Const Value, Change: WideString; SelStart, SelEnd, Flags: Integer): WideString;
ActiveX
Function PDFlib::ExecuteFormFieldScriptJSON(Index As Long, Action As Long, InputValue As String, Change As String, SelStart As Long, SelEnd As Long, Flags As Long) As String
Beschikbaar op IPDFlibrary4 vanaf type library-versie 3.5
DLL
const wchar_t* DLExecuteFormFieldScriptJSON(int InstanceID, int Index, int Action, const wchar_t* Value, const wchar_t* Change, int SelStart, int SelEnd, int Flags);
const char* DLExecuteFormFieldScriptJSONA(int InstanceID, int Index, int Action, const char* Value, const char* Change, int SelStart, int SelEnd, int Flags);
Parameters
| Index | De 1-gebaseerde veldindex |
|---|---|
| Action | 0 validate, 1 calculate, 2 format of 3 keystroke |
| Value, Change | De initiële event.value en event.change |
| SelStart, SelEnd | De selectie die de wijziging vervangt |
| Flags | Som van 1 willCommit, 2 fieldFull, 4 keyDown, 8 modifier en 16 shift |
Retourwaarden
Een JSON-object met result (de retourwaarde van ExecuteFormFieldScriptEvent), value, change, rc, selStart en selEnd; een ongeldige Action geeft {"result":0} terug met LastErrorCode 708
Het bronveld is het targetveld. DLL-strings horen bij de instance return buffer en moeten worden gekopieerd vóór de volgende call
Zie ook
ExecuteFormFieldScriptEvent, SetFormScriptHostActionMode, GetFormScriptDiagnostics