Test Your Knowledge: Questions

Question 18-1

Why is it necessary to write a function for creating new XMLHttpRequest objects?

Question 18-2

What is the purpose of the try...catch construct?

Question 18-3

How many properties and how many methods does an XMLHttpRequest object have?

Question 18-4

How can you tell when an Ajax call has completed?

Question 18-5

How do you know whether an Ajax call completed successfully?

Question 18-6

What XMLHttpRequest object’s property returns an Ajax text response?

Question 18-7

What XMLHttpRequest object’s property returns an Ajax XML response?

Question 18-8

How can you specify a callback function to handle Ajax responses?

Question 18-9

What XMLHttpRequest method is used to initiate an Ajax request?

Question 18-10

What are the main differences between an Ajax GET and POST request?

See the section Chapter 18 Answers in Appendix A for the answers to these questions.

Get Learning PHP, MySQL, and JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.