본문 바로가기

전체 글810

parent에서 iFrame함수 호출하기 1. parent page function test() { var test1 = document.getElementById("seatMap").contentWindow.getReserveChk(); alert(test1); } function test1() { var imgpath = document.getElementById("seatMap").contentWindow.getImagePath("img1"); alert(imgpath); } 2. child page function getReserveChk() { return 'test'; } function getImagePath(value1) { return $("img1").src; } function setCursor(value1, value2) .. 2012. 3. 21.
iframe 사이즈 늘리기(1) 1. parent page 브라우저에 상관없이 parent page에서 height는 정확하게 가져오는데 width는 좀 어렵다. 그래서 width는 고정한다. 그러면 높이는 자동으로 맞추어준다. 2. child page 그냥 기존대로 ... 2012. 3. 21.
뭐니뭐니해도 기본이 최고인거 같다 -- select box 만들기 - explore, firefox 둘다 만족하기 function setSelYear1(value1) { var select1 = document.createElement("select"); select1.setAttribute("id","sel1"); var optionList = document.createElement("option"); optionList.setAttribute("value","25"); var optionListText = document.createTextNode("1시간00"); optionList.appendChild(optionListText); select1.appendChild(optionList); var selectBoxNode = document.getElement.. 2012. 3. 21.
javascript debug 1. Windows Script Debugger 1) 도구>옵션>고급>스크립트 디버깅 사용 안 함 -> 체크해제 2) Windows Script Debugger 다운로드 설치 http://www.microsoft.com/downloads/details.aspx?FamilyID=6a326d9c-f47e-4c92-b42a-b3d43029e96f&DisplayLang=ko 2. Companion.JS 1) 다운로드 http://www.my-debugbar.com/wiki/CompanionJS/HomePage 3. FireBug 1) 다운로드 http://www.getfirebug.com/ 2012. 3. 21.
prototype - Event.observe prototype - Event.observe Event.observe 는 prototype.js 에 정의된 메소드로 윈도우 load시 다양한 이벤트를 등록해 준다. 예) Event.observe("btnNew", "click", objEvent.fnWriteFrmView); 설명) id "btnNew"라는 엘리먼트에서 click이벤트를 발생하면 objEvent라는 이벤트클래스의 fnWriteFrmView 메소드를 호출해라! 2012. 3. 21.
javascript - pop() javascript - pop() 자바스클립트 네이티브 메세드로 자바스크립트 배열의 마지막 엘리먼트를 삭제하고 동일한 배열에 저장하고 리턴값으로 삭제된 마지막 엘리먼트를 보낸다. 2012. 3. 21.