XML AJAXLesson 22Free preview
AJAX XMLHttp
This lesson is part of XML · All levels
Summary
XMLHttpRequest is a core AJAX object created with new XMLHttpRequest() in modern browsers. Once the object is created, the next step is to call open() to specify the method and URL, then send() to send the request. The responses are then read via callback onreadystatechange based on readyState values and status.
Key points
- Objects created with new XMLHttpRequest()
- Open() specifies the method, URL, and asynchronous mode
- Send() sends a request to the server
- Callback onreadystatechange informs of a change in status
- The combination of readyState 4 and status 200 means success.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.