ExecuteFormFieldScriptJSON
폼, JavaScript 보안
설명
필드 검증, 계산, 포매팅, 키 입력 액션을 실행하고 결과와 이벤트 상태를 JSON으로 반환합니다. DLL과 ActiveX 인터페이스에 ExecuteFormFieldScriptEvent를 제공합니다
구문
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
타입 라이브러리 버전 3.5부터 IPDFlibrary4에서 사용할 수 있습니다
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);
매개변수
| Index | 1 기반 필드 인덱스 |
|---|---|
| Action | 0 validate, 1 calculate, 2 format, 3 keystroke |
| Value, Change | 초기 event.value와 event.change |
| SelStart, SelEnd | 변경이 교체하는 선택 영역 |
| Flags | 1 willCommit, 2 fieldFull, 4 keyDown, 8 modifier, 16 shift의 합 |
반환 값
result(ExecuteFormFieldScriptEvent 반환 값), value, change, rc, selStart, selEnd를 담은 JSON 객체입니다. 잘못된 Action은 LastErrorCode 708과 함께 {"result":0}을 반환합니다
소스 필드는 대상 필드입니다. DLL 문자열은 인스턴스 반환 버퍼에 속하므로 다음 호출 전에 복사해야 합니다
참고 항목
ExecuteFormFieldScriptEvent, SetFormScriptHostActionMode, GetFormScriptDiagnostics