이 문서는 읽기 전용입니다. 원본을 볼 수는 있지만 바꿀 수는 없습니다. 문제가 있다고 생각하면 관리자에게 문의하세요. ====== 이미지 파일 선택 가이드 ====== 이미지 컴포넌트의 이미지를 선택하여 동작시키는 화면이다. 관련 API로 selectlocalimage, getimagefileobject가 있다. 관련 이벤트로 on_selectimage가 있다. ===== 예시 ===== 템플릿 위치: /HTML5/COMPONENT/IMAGE/image_selectfile 템플릿 파일 * [[xf5projecthome>template/screen/HTML5/COMPONENT/IMAGE/image_selectfile.xml|image_selectfile.xml]] * [[xf5projecthome>template/screen/HTML5/COMPONENT/IMAGE/image_selectfile.js|image_selectfile.js]] * [[xf5projecthome>template/template.html?xframe_screen_url=/HTML5/COMPONENT/IMAGE/image_selectfile|새창으로 실행]] <php> echo '<html>'; echo '<iframe src="'; echo $conf['plugin']['xf5']['xf5projecthome'], 'template/template.html?'; echo 'xframe_screen_url=/HTML5/COMPONENT/IMAGE/image_selectfile"'; echo ' class="_xf5_iframe"'; echo ' style="'; echo $conf['plugin']['xf5']['xf5iframestyle']; echo '">'; echo '</iframe>'; echo '</html>'; </php> ==== 화면 스크립트 ==== <sxh javascript> // "이미지 선택" 버튼 이벤트 function btn_imageselect_on_mouseup(objInst) { //로컬에서 파일을 선택하는 동작 this.image.selectlocalimage(); } /** * 사용자가 이미지 파일을 선택하여 변경시 호출 이벤트 * @param {Object} objInst 이미지 컴포넌트 인스턴스 * @param {number} strFileName 화면 파일 이름 * @param {number} objFile 오브젝트 파일 */ function image_on_selectimage(objInst, strFileName, objFile) { factory.consoleprint("on_selectimage> Start"); factory.consoleprint("on_selectimage> Image Object Name = " + objInst.getname()); factory.consoleprint("on_selectimage> strFileName = " + strFileName); this.fld_imagefilename.settext(strFileName); if (objFile) { this.fld_imagefilesize.settext(objFile.size); } } </sxh> guide/component/image/image_selectfile.txt 마지막으로 수정됨: 2024/04/12 15:50저자 127.0.0.1