AJAX Interview Questions and Answers Test 2

AJAX interview questions with answers, faqs test 2 to practice ajax questions. Here, you may find questions to learn AJAX test on ajax properties, call back function, ajax functions, ajax objects, role of dom,.

FAQs: AJAX Test 2

Question: What is role of responseText property?

Answer:

The responseText property returns the response data as a string.

Question: What is role of responseXML property?

Answer:

The responseXML property returns the response data as XML data.

Question: What is role of onreadystatechange in AJAX?

Answer:

The onreadystatechange event is triggered every time the readyState changes. The readyState property holds the status of the XMLHttpRequest.

Question: What is call back function?

Answer:

A callback function is a function passed as a parameter to another function.

Question: Which function is used for a web page to communicate with a web server while a user type characters in an input field?

Answer:

The function showHint() is used for this purpose and this function is triggered by onkeyup event.

Question: What is the XMLHttpRequest object?

Answer:

XMLHttpRequest offers a non-blocking way for JavaScript to communicate back to the web server to update only part of the web page.

Question: What is role of DOM in AJAX?

Answer:

DOM is an API for accessing and manipulating structured documents. It represents the structure of XML and HTML documents.

Question: List steps in a sequence of AJAX operation.

Answer:

When an AJAX operation is requested, following steps takes place to complete request.

  • A client event occurs. A JavaScript function is called.
  • An XMLHttpRequest> object is created.
  • The XMLHttpRequest> object is configured.
  • The XMLHttpRequest> object makes an asynchronous request to the web server.
  • The web server returns the result containing XML document.
  • The XMLHttpRequest> object calls the callback() function and processes the result.
  • The HTML DOM is updated to update HTML page.
DMCA.com Protection Status DMCA.com Protection Status