/** * Author : MC ½É»õ (ganer9r@naver.com) * Make Date : 2006-09-22 * comment : ajaxÀÇ xmlÀ» javascript °´Ã¼Çü½ÄÀ¸·Î ÀÚµ¿ º¯È¯ **/ /* Ajax »ç¿ëÀ» À§ÇÑ ±âº» ÄÞÆ÷³ÍÆ® Start */ function AjaxDataControl(){ this.xmlHttp = null; this.getHttpRequest = function(URL, object){ var xmlHttp = this.xmlHttp; var xmlData = null; // FFÀÏ °æ¿ì window.XMLHttpRequest °´Ã¼°¡ Á¸ÀçÇÑ´Ù. if(!xmlHttp){ if(window.XMLHttpRequest) { xmlHttp = new XMLHttpRequest(); } else { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } this.xmlHttp = xmlHttp; } xmlHttp.open('GET', URL, true); xmlHttp.onreadystatechange = function() { // readyState °¡ 4 °í status °¡ 200 ÀÏ °æ¿ì ¿Ã¹Ù¸£°Ô °¡Á®¿È if(xmlHttp.readyState==4 && xmlHttp.status == 200 && xmlHttp.statusText=='OK') { var xmlData = xmlHttp.responseXML; object.setXmlData(xmlData); } } xmlHttp.send(''); } this.getXmlRootNode = function(nodes, rootName){ var rootNode = nodes.getElementsByTagName(rootName); return rootNode; } } /* Ajax »ç¿ëÀ» À§ÇÑ ±âº» ÄÞÆ÷³ÍÆ® End */ /* Ajax¿¡¼­ ¸®ÅϹÞÀº XML NODE¸¦ JAVASCRIPT OBJECT Çü½ÄÀ¸·Î º¯È¯ Start */ function AjaxObject(){ this.ac = null; this.xmlData = null; this.rootName = null; this.functionName = null; this.arguments = new Array(); this.inArray = function(array, value){ var result = false; for(var i=0; i < array.length; i++){ if(array[i] == value){ result = true; break; } } return result; } this.getHttpRequest = function(Url, functionName){ if(this.ac == null){ this.ac = new AjaxDataControl(); } this.functionName = functionName; for(var i=2; i