What does AJAX stand for?
A
Asynchronous Java Application for XML
B
Advanced JavaScript and XML
C
Asynchronous JavaScript and XML
Analysis & Theory
**AJAX** stands for **Asynchronous JavaScript and XML**, a technique for updating web pages without reloading.
What is the role of XML in AJAX?
C
Sending and receiving structured data from the server
Analysis & Theory
In AJAX, XML is used to **transport structured data** between the client and server.
Which object is commonly used to send AJAX requests in JavaScript?
Analysis & Theory
`XMLHttpRequest` is the built-in JavaScript object used to send AJAX requests.
Which method of the XMLHttpRequest object is used to send the request?
Analysis & Theory
`send()` is used to **transmit** the AJAX request to the server.
How is XML data usually accessed in an AJAX response?
Analysis & Theory
`xhr.responseXML` returns the **parsed XML document** from the server.
Which HTTP method is commonly used for AJAX data submission?
Analysis & Theory
`POST` is commonly used to **submit data** via AJAX, especially when sending XML.
What does `xhr.readyState === 4` indicate in an AJAX call?
A
The request has been sent
C
The operation is complete
Analysis & Theory
`readyState == 4` means the **request is complete** and the response is ready to use.
Which MIME type should the server use to send XML data in an AJAX response?
Analysis & Theory
`text/xml` is the correct MIME type for sending **XML responses** from the server.
Which JavaScript property is used to check if an AJAX request was successful?
Analysis & Theory
`xhr.status` returns the **HTTP status code** (e.g., 200 for success) of the AJAX response.
Which of the following is TRUE about using XML with AJAX?
B
XML can be used for both request and response in AJAX
C
AJAX works only with JSON
D
XML must be converted to HTML before use
Analysis & Theory
AJAX can **send and receive XML**, and JavaScript can parse the XML using DOM methods.