What should be called before 'send ()' to prepare an XMLHttpRequest object?
Answer: b. open ()
What is the correct way to execute the function "calc()" when an XMLHttpRequest is loaded?
Answer: a. myRequest.onreadystatechange = calc;
Can AJAX be used with HTTPS (SSL)?
Answer: a. yes
Can you call responseBody or responseText to get a partial result when the readyState of an XMLHttpRequest is 3(receiving)?
Answer: b. No
How can you create an XMLHttpRequest under Internet Explorer 6?
Answer: b.var oReq = new ActiveXObject ("MSXML2.XMLHTTP.3.0");
Consider the following function:
function foo ()
What will the following code do?
var myVar = foo;
Answer: b. Assign the pointer to function foo to myVar
Can WebDav methods like PROPFIND be used with XMLHttpRequest.open()?
Answer: b. No
In the following list, which ones are used to fetch the result data of an XMLHttpRequest?
Answer: e. responseXML
Answer: b. 2myVar
Answer: b. /* */
Is it possible to make a page "reload-safe" when using AJAX?
Answer: b. yes, if each AJAX request modifies the server side context, which would render a page similar to the actual JS modified page, if reloaded.
What language does AJAX use on the client side?
Answer: c. ECMAScript
Which of the following cannot be resolved by using AJAX?
Answer: d. Server crashes (failover)
It might be needed to set the request content-type to XML explicitly. How can you do so for an XMLHttpRequest Object?
Answer: e. myReq.setRequestHeader ("Content-Type", "text/xml");
You want to update the following element with the XMLHttpRequest status. Which of the following approaches is correct for the purpose?
Answer: b. var myDiv = document.getElementById ("statusCode");
myDiv.innerHTML = req.status;
What is the correct way to have the function checkState called after 10 seconds?
Answer: b. window.setTimeout(checkState, 10000);
What is true regarding XMLHttpRequest.abort()?
Answer: b. It will remove the onreadystatechange event handler
Which of the following request types should be used with AJAX?
Answer: d. HTTP POST should be used when the state is updated on the server
When may asynchronous requests be used?
Answer: c.To load additional code from the server
Which of the following are drawbacks of AJAX?
Answer: a.The browser back button cannot be used in most cases
What is NOSCRIPT tag for?
Answer: c. To enclose text to be displayed if the browser doesn't support JS
The server returns data to the client during an AJAX postback. Which of the following is correct about the returned data?
Answer: a. It only contains the data of the page elements that need to be changed
Which of the following list is/are true regarding AJAX?
Answer: c. It can be used to make requests to the server without blocking the user
What is the common way to make a request with XMLHttpRequest?
Answer: d. myReq.send(null);
Which protocol is used to transfer data in an AJAX request?
Answer: b. Hypertext Transfer Protocol, HTTP
What is the syntax for the event listener that monitors whether the XMLHttpRequest object's readyState attribute has changed?
Answer: a. onreadystatechange
The onreadystatechange change event is used to invoke behavior when
Answer: d. the status of the asynchronous request changes.
Answer: c. Better cross-browser compatibility and faster speed of development
Which browser features and/or technologies must be enabled, at a minimum, for AJAX techniques to function properly?
The primary benefit of using AJAX techniques in a web application is:
Answer: c. It allows web applications to send asynchronous data requests to a server without a user initiated page load.
What arguments MUST be supplied to an XMLHttpRequest object's .open() method, and in what order?
Answer: b. HTTP method as string, URL as string, async flag as boolean
After a request completes, which property of the XMLHttpRequest object can be used to retrieve a DOM representation of a remote XML document?
Answer: d. responseXML
Which method on the XMLHttpRequest object is used to send custom HTTP headers with a request?
Answer: a. setRequestHeader
If an Ajax request loads JSON-formatted responseText into the variable returnedData, what code will turn the data into a readable JSON object in modern browsers, including IE8 and above?
Answer: c. JSON.parse(returnedData);
Don't Miss A Single Updates
✓Remember to check your email account to confirm your subscription.