function AJAX_UpdatePage( str, updateArea, updateOptionFlag ){ var result = document.getElementById( updateArea ); if ( updateOptionFlag == "C_LIST_APPEND" ) { result.removeChild(document.getElementById('listItemMore')); result.innerHTML += str; } else if ( updateOptionFlag == "C_OVERWRITE_AREA" ) { result.innerHTML = str; myScroll.scrollTo(0, 0, "0"); } else { result.innerHTML = str; myScroll.scrollTo(0, 0, "0"); } myScroll.refresh(); AJAX_requestFlag = false; } function AJAX_Get_xmlHttpReq() { var xmlhttp = null; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } return xmlhttp; } function AJAX_DataRequest( strURL, querystring, updateArea, updateOptionFlag ) { var xmlHttpReq = false; var self = this; self.xmlHttpReq = AJAX_Get_xmlHttpReq(); self.xmlHttpReq.open('POST', strURL, true); self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); self.xmlHttpReq.onreadystatechange = function() { if(self.xmlHttpReq.readyState == 0) { // ���� �ʱ�ȭ �ȵ� }else if(self.xmlHttpReq.readyState == 1) { // �д� �� }else if(self.xmlHttpReq.readyState == 2) { // �б� �Ϸ� }else if(self.xmlHttpReq.readyState == 3) { // �۾� �� }else if(self.xmlHttpReq.readyState == 4) { // �۾�Ϸ� AJAX_UpdatePage( self.xmlHttpReq.responseText, updateArea, updateOptionFlag ); } }; self.xmlHttpReq.send( querystring ); } function ajaxGetDataString() { var args = this.ajaxGetDataString.arguments; //args length 1�� =args[0]:�Ķ���� //args length 2�� =args[0]:�Ķ����, args[1]:(���� ��޺���=> ex.append/overwrite) //args length 3�� =args[0]:�Ķ����, args[1]:(���� ��޺���=> ex.append/overwrite), args[2]:actionName var xmlHttpReq = false; var self = this; self.xmlHttpReq = AJAX_Get_xmlHttpReq(); if(args.length==1 || args.length==2){ self.xmlHttpReq.open('POST', "/LIBROPIA/libropia.do", true); }else if(args.length==3){ self.xmlHttpReq.open('POST', args[2], true); } self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); self.xmlHttpReq.onreadystatechange = function() { if(self.xmlHttpReq.readyState == 0) { // ���� �ʱ�ȭ �ȵ� }else if(self.xmlHttpReq.readyState == 1) { // �д� �� }else if(self.xmlHttpReq.readyState == 2) { // �б� �Ϸ� }else if(self.xmlHttpReq.readyState == 3) { // �۾� �� }else if(self.xmlHttpReq.readyState == 4) { // �۾�Ϸ� //alert(self.xmlHttpReq.responseText); if(args.length==1){ getXmlResult(self.xmlHttpReq.responseText); }else{ getXmlResult(self.xmlHttpReq.responseText, args[1] ); } } }; self.xmlHttpReq.send( args[0] ); } function AJAX_xmlhttpPost(URL) { var xmlhttp = null; xmlhttp = AJAX_Get_xmlHttpReq(); xmlhttp.open('GET', URL,false); xmlhttp.onreadystatechange = function() { if(xmlhttp.readyState==4 && xmlhttp.status == 200 && xmlhttp.statusText=='OK') { responseText = xmlhttp.responseText; } }; xmlhttp.send(''); return responseText = xmlhttp.responseText; } function AJAX_DataRequest_UserFun( strURL, querystring, updateUserFun ) { var xmlHttpReq = false; var self = this; self.xmlHttpReq = AJAX_Get_xmlHttpReq(); self.xmlHttpReq.open('POST', strURL, true); self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); self.xmlHttpReq.onreadystatechange = function() { //alert(self.xmlHttpReq.readyState); if(self.xmlHttpReq.readyState == 0) { // ���� �ʱ�ȭ �ȵ� }else if(self.xmlHttpReq.readyState == 1) { // �д� �� }else if(self.xmlHttpReq.readyState == 2) { // �б� �Ϸ� }else if(self.xmlHttpReq.readyState == 3) { // �۾� �� }else if(self.xmlHttpReq.readyState == 4) { // �۾�Ϸ� if(updateUserFun) {(updateUserFun)( self.xmlHttpReq.responseText );} } }; self.xmlHttpReq.send( querystring ); } function AJAX_DataRequest_GET( strURL, querystring, updateUserFun ) { var xmlHttpReq = false; var self = this; self.xmlHttpReq = AJAX_Get_xmlHttpReq(); self.xmlHttpReq.open('GET', strURL, true); self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); self.xmlHttpReq.onreadystatechange = function() { //alert(self.xmlHttpReq.readyState); if(self.xmlHttpReq.readyState == 0) { // ���� �ʱ�ȭ �ȵ� }else if(self.xmlHttpReq.readyState == 1) { // �д� �� }else if(self.xmlHttpReq.readyState == 2) { // �б� �Ϸ� }else if(self.xmlHttpReq.readyState == 3) { // �۾� �� }else if(self.xmlHttpReq.readyState == 4) { // �۾�Ϸ� if(updateUserFun) {(updateUserFun)( self.xmlHttpReq.responseText );} } }; self.xmlHttpReq.send( querystring ); } function loadXMLDoc(url,cfunc) { var xmlhttp = null; xmlhttp = AJAX_Get_xmlHttpReq(); xmlhttp.onreadystatechange=cfunc; xmlhttp.open("GET",url,true); xmlhttp.send(); } //function myFunction() //{ // loadXMLDoc("ajax_info.txt",function() // { // if (xmlhttp.readyState==4 && xmlhttp.status==200) // { // document.getElementById("myDiv").innerHTML=xmlhttp.responseText; // } // } //); //

Let AJAX change this text

//