ExecuteFormFieldScriptEvent

폼, JavaScript 보안

설명

경계가 있는 로컬 폼 스크립트 런타임에서 필드 /K, /F, /V 또는 /C 액션을 실행하고 결과 이벤트 상태를 반환합니다

구문

Function TPDFlib.ExecuteFormFieldScriptEvent(Index: Integer; Action: TPDFlibFormScriptAction; Const InputEvent: TPDFlibFormScriptEvent; Out OutputEvent: TPDFlibFormScriptEvent): Integer;

매개변수

Index1 기반 대상 필드 인덱스
Action실행할 필드 이벤트
InputEvent초기 값, 변경, 소스 필드, 선택, 키 상태, 커밋 상태
OutputEvent쓰기 가능한 value, change, rc, selStart, selEnd 속성을 포함한 최종 이벤트 상태

반환 값

실행이 성공하고 event.rc가 true로 남으면 1을 반환하고, 액션이 없거나 이벤트를 거부하거나 지원되지 않거나 잘못되었거나 리소스 한도를 초과하면 0을 반환합니다

비고

제어 대상 객체 표면은 표준 필드 이벤트 속성, 읽기 전용 event.target과 event.source 필드 속성, this.numFields, this.getField(...), this.getNthFieldName(...)을 노출합니다

필드 객체는 name, type, value, valueAsString, readonly, required, charLimit를 노출하되 객체 변경은 허용하지 않습니다

AFNumber_Keystroke, AFPercent_Keystroke, AFDate_KeystrokeEx, AFTime_Keystroke, AFSpecial_Keystroke, AFSpecial_KeystrokeEx 헬퍼는 타이핑 중 키스트로크가 만들어 낼 값을 검사하고, WillCommit이 true이거나 검증 중일 때는 완성된 값을 검사합니다. 날짜에는 시간대가 없습니다

푸시 버튼, 체크 박스, 라디오 버튼은 /K, /F, /V, /C 실행을 거부하며, 성공한 계산만 최종 값을 저장된 필드에 기록합니다

헬퍼로는 Acrobat 날짜 필드 코드를 쓰는 AFMergeChange(event), util.printd, util.scand, getFullYear, getMonth, getDate, getDay, getHours, getMinutes, getSeconds, getTime을 갖춘 숫자 new Date(...) 값, %d, %f, %s, %x 변환과 ,0~,4 구분자 스타일을 갖춘 util.printf, Math.pow와 Math.sqrt, 전역 getField(...), 그리고 문자열·숫자 멤버 length, toFixed, toString, toUpperCase, toLowerCase, trim, indexOf, charAt, substring, substr이 있습니다

런타임에는 파일, 네트워크, 프로세스, UI, 동적 코드, 무제한 문서 객체 기능이 없습니다 app.alert 같은 호스트 액션은 결코 수행되지 않으며, SetFormScriptHostActionMode가 이를 스크립트 미지원으로 만들지 애플리케이션에 보고할지 선택합니다

참고 항목

TPDFlibFormScriptEvent, SetFormScriptLimits, GetFormScriptDiagnostics, ExecuteFormFieldScript