'programing/ajax'에 해당되는 글 3건

  1. 2007.03.14 XMLHttpRequest의 표준 프로퍼티
  2. 2007.03.14 XMLHttpReques
  3. 2007.03.09 XMLHttpRequest에 의한 송수신

- onreadystatechange
  상태에 변경이 있을 때마다 시작되는 이벤트 핸들러로 보통은 자바스크립트 함수를 호출한다.

- readyState
 요청 상태를 나타내며 5가지 값을 가진다.
 0 = 초기화 안됨, 1 = 로드중, 2 = 로드됨, 3 = 처리중, 4 = 완료됨

- responseText
  문자열로 된 서버의 응답

- responseXML
  MXL형식으로 된 응답, 이 객체는 파싱이 가능하며 DOM 객체로 처리된다.

- status
   서버로부터 받는 HTTP 상태 코드, 200(정상) 404(서버를 찾지 못한경우) 등..

- statusText
 
HTTP 상태 코드의 텍스트 버전

Posted by 자스

2007. 3. 14. 23:01 programing/ajax

XMLHttpReques

function newXMLHttpRequest() {
 var xmlreq = false;
 if (window.XMLHttpRequest) {
  // Create XMLHttpRequest object in non-Microsoft browsers
  xmlreq = new XMLHttpRequest();
 } else if (window.ActiveXObject) {
  // Create XMLHttpRequest via MS ActiveX
  try {
   // Try to create XMLHttpRequest in later versions
   // of Internet Explorer
   xmlreq = new ActiveXObject("Msxml2.XMLHTTP");
  } catch (e1) {
   // Failed to create required ActiveXObject
   try {
    // Try version supported by older versions
    // of Internet Explorer
    xmlreq = new ActiveXObject("Microsoft.XMLHTTP");
   } catch (e2) {
    // Unable to create an XMLHttpRequest with ActiveX
   }
  }
 }
 return xmlreq;
}
Posted by 자스
오브젝트 작성
new XMLHttpRequest()
new ActiveXObject("Microsoft.XMLHTTP")
new ActiveXObject("MSXML2.XMLHTTP")

HTTP요청
open()
send()

착신과 데이터처리
onreadystatechange

redyState

reponseText  or  reponseXML
Posted by 자스
이전버튼 1 이전버튼

블로그 이미지
자스

공지사항

Yesterday
Today
Total

달력

 « |  » 2025.8
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31

최근에 올라온 글

최근에 달린 댓글

글 보관함