What does the following code do? var xhttp, xmlDoc, txt, x, i; xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { xmlDoc = this.responseXML; txt = ""; x = xmlDoc.getElementsByTagName("QUESTION"); for (i = 0; i < x.length; i++) { txt = txt + x[i].childNodes[0].nodeValue + "
"; } document.getElementById("demo").innerHTML = txt; } }; xhttp.open("GET", "questions.xml", true); xhttp.send();
Correct Answer:
responseXML gets response as XMLDocument
Note: This Question is unanswered, help us to find answer for this one
How can you send cookies in CORS Ajax call ?
Correct Answer:
You must set the withCredentials flag on the XMLHttpRequest transport. xhr.withCredentials = true;
Note: This Question is unanswered, help us to find answer for this one
AJAX is used to create a very _____ web interface.
Correct Answer:
dynamic
Note: This Question is unanswered, help us to find answer for this one
How can you stop jQuery AJAX response from being cached?
Correct Answer:
Set cache:false in jQuery.ajax() call
Note: This Question is unanswered, help us to find answer for this one
Which object shares a powerful set of methods that can be used to expedite communications between the client and server?
Correct Answer:
XMLHttpRequest()
Note: This Question is unanswered, help us to find answer for this one
Can the XMLHttpRequest object be disabled via browser settings?
Correct Answer:
No
Note: This Question is unanswered, help us to find answer for this one
Which of the answers is correct in order to send the following data with request? var requestData = "username=" + escape(document.getElementById("username").value) + "&password=" + escape(document.getElementById("password1").value) + "&firstname=" + escape(document.getElementById("firstname").value) + "&lastname=" + escape(document.getElementById("lastname").value) + "&email=" + escape(document.getElementById("favorite").value);
Correct Answer:
abcRequest.open("POST", url, true); abcRequest.send(requestData);
Note: This Question is unanswered, help us to find answer for this one
Why would a public api return a non valid json like this? for(;;); {"key1":val1,"key2": "val2"}
Correct Answer:
These strings are commonly referred to as an "unparseable cruft" and are security measures.
Note: This Question is unanswered, help us to find answer for this one
Which of the following parameters to request.open() are correct?
Correct Answer:
request.open("GET", url, true);
request.open("POST", url, true);
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Which of the following is true to convert AJAX JSON response into object?
Correct Answer:
eval(' + request.responseText + ');
Note: This Question is unanswered, help us to find answer for this one
Which of the following is true about asynchronous request?
Correct Answer:
User has to wait while request is taking place
Note: This Question is unanswered, help us to find answer for this one
Which of the following is the correct way to disable register button while request is processing?
Correct Answer:
document.getElementById("register").disabled = true;
Note: This Question is unanswered, help us to find answer for this one
To check if DOM element 'currentDiv' don't have any child nodes, we can use which one of the following conditions?
Correct Answer:
currentDiv.childNodes.length == 0
Note: This Question is unanswered, help us to find answer for this one
Which of the following methods is NOT supported by the XMLHttpRequest object?
Correct Answer:
quit
Note: This Question is unanswered, help us to find answer for this one
By default, browsers do not support cross domain AJAX requests.
Correct Answer:
False
Note: This Question is unanswered, help us to find answer for this one
Which of the following statement best describes the below code (function worker() { $.ajax({ url: 'ajax/test.html', success: function(data) { $('.result').html(data); }, complete: function() { setTimeout(worker, 5000); } }); })();
Correct Answer:
Periodically performs an ajax request
Note: This Question is unanswered, help us to find answer for this one
For the following code fragment function Foo() { this.data = 42, document.body.onclick = this.method.bind(this); } Foo.prototype.method = function() { console.log(this.data); }; choose the option that shows the output to the console log
Correct Answer:
42
Note: This Question is unanswered, help us to find answer for this one
The readyState property in onreadystatechange event equal to 1 means ?
Correct Answer:
server connection established
Note: This Question is unanswered, help us to find answer for this one
for the code fragment below $.ajax({ type: 'POST', url: 'submit1.php', data: $("#regist").serialize(), dataType: 'json', success: function() { // code here} }); Choose the statement that best describes the role of the success ‘key’
Correct Answer:
Defines an AJAX callback for a response with status code 200
Note: This Question is unanswered, help us to find answer for this one
Which of the following will not execute request asynchronously provided usernameRequest object already exists?
Correct Answer:
usernameRequest.open("GET", "abc.php", false); usernameRequest.send(null);
Note: This Question is unanswered, help us to find answer for this one
Choose the best statement for the expression JSON.stringify(jsObj);
Correct Answer:
Will fail if the browser lacks native JSON serialization
Note: This Question is unanswered, help us to find answer for this one
What does the status == 404 means ?
Correct Answer:
the Ajax call to the page was not found
Note: This Question is unanswered, help us to find answer for this one
In an ajax request function callback you have the following code $('#childdiv').html(data); choose the most probable reason why a previous delegated 'click' event no longer functions
Correct Answer:
If you do use event delegation, you must bind to a non-changing parent element.
Note: This Question is unanswered, help us to find answer for this one
Which of the following object.method is responsible for writing text to current web page?
Correct Answer:
document.write
Note: This Question is unanswered, help us to find answer for this one
Which of the following can be used to display 'inProcess.png' image while processing request?
Correct Answer:
document.getElementById("status").src = "inProcess.png";
Note: This Question is unanswered, help us to find answer for this one
Which of the following will change the class of XHTML element having ID of 'username'?
Correct Answer:
document.getElementById("username").className = "approved";
Note: This Question is unanswered, help us to find answer for this one
What is wrong in the following function ? function loadDoc() { varxhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 3 &&this.status == 200) { console.log(this.responseText); } }; xhttp.open("GET", "cd_catalog.xml", true); xhttp.send(); }
Correct Answer:
In line 4, the comparison of this.readyState should be with 4
Note: This Question is unanswered, help us to find answer for this one
Which of the following are not 'document' object methods?
Correct Answer:
document.replace(element)
Note: This Question is unanswered, help us to find answer for this one
Choose the best answer to describe ‘Deferred objects’
Correct Answer:
jQuery's custom implementation of promises
Note: This Question is unanswered, help us to find answer for this one
Which of the following methods are used for cross domain AJAX calls?
Correct Answer:
Both of the above
Note: This Question is unanswered, help us to find answer for this one
For the code fragment function x(a,b,e,d,c){ c=new XMLHttpRequest; c.open(e||'get',a); c.onload=b; c.onerror=error; c.send(d||null) } Choose the option that best describes the parameter d
Correct Answer:
Form data
Note: This Question is unanswered, help us to find answer for this one
Can we make a HTTP POST Ajax call?
Correct Answer:
Yes, set method param of open() function to POST
Note: This Question is unanswered, help us to find answer for this one
For the code fragment below, function ajax(a,b,c) { c=new XMLHttpRequest; c.open('GET',a); c.onload=b; c.send() } Choose the option that best describes the parameter c
Correct Answer:
A variable definition
Note: This Question is unanswered, help us to find answer for this one
Which of the following is NOT a valid method in the key/value pair to configure ajax request in jquery.ajax()?
Correct Answer:
pass
Note: This Question is unanswered, help us to find answer for this one
What does the getAllResponseHeaders() function do ?
varxhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 4 &&this.status == 200) { console.log(this.getAllResponseHeaders()); } }; xhttp.open("GET", "ajax_info.txt", true); xhttp.send();
Correct Answer:
Get all response headers of Ajax call
Note: This Question is unanswered, help us to find answer for this one
For the following code fragment function Foo() { this.data = 42, document.body.onclick = this.method; } Foo.prototype.method = function() { console.log(this.data); }; choose the option that shows the output to the console log
Correct Answer:
undefined
Note: This Question is unanswered, help us to find answer for this one
For the following code fragment foo(function(r) { // code }); Choose the correct description of the ‘function(r)’
Correct Answer:
A callback
Note: This Question is unanswered, help us to find answer for this one
Which of the following methods can be used to assign multiple event handlers?
Correct Answer:
addEventListener()
Note: This Question is unanswered, help us to find answer for this one
Which of the following XMLHttpRequest Object method returns all the header information?
Correct Answer:
getAllResponseHeaders()
Note: This Question is unanswered, help us to find answer for this one
Which of the following is correct for the term 'Progressive enhancement'? (choose all that apply)
Correct Answer:
Progressive enhancement allows everyone to access the basic content and functionality of a web page, using any browser or Internet connection, while also providing an enhanced version of the page to those with more advanced browser software or greater bandwidth.
The reverse of 'Graceful Degradation'
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Which of the following are General HTTP headers?
Correct Answer:
Connection
Date
Mime-Version
Trailer
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Which of the following are HTTP response headers?
Correct Answer:
Age
Public
Retry-After
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
The responseText or responseXML property of the XMLHttpRequest ____?
Correct Answer:
object
Note: This Question is unanswered, help us to find answer for this one
For the code fragment below function foo() { var httpRequest = new XMLHttpRequest(); httpRequest.open('GET', "/echo/json"); httpRequest.send(); return httpRequest.responseText; } var result = foo(); What will be the value of ‘result’
Correct Answer:
Undefined
Note: This Question is unanswered, help us to find answer for this one
The browser will put 'text' that the server returns in which of the following Request Object property?
Correct Answer:
responseText
Note: This Question is unanswered, help us to find answer for this one
Fill the correct blanks in following code: Function processXhrChange() { // Check readyState to make sure the XMLHttpRequest has been fully loaded if (Xhr.readyState == ______ ) { // Check status code from server for "OK" if ( Xhr.status == ______ ) { // Process incoming data // Update our hit counter Hit = hit + 1; } else { // Request had a status code other than 200 Alert ("There was a problem communicating with the server\n"); } }
Correct Answer:
4 200
Note: This Question is unanswered, help us to find answer for this one
Which of the following property of XMLHttpRequest object holds its status?
Correct Answer:
readyState
Note: This Question is unanswered, help us to find answer for this one
Can ActiveXObject work on browsers like Chrome and Firefox?
Correct Answer:
No, ActiveX is only supported by IE - the other browsers use a plugin architecture called NPAPI
Note: This Question is unanswered, help us to find answer for this one
Which of the following statements is true about following code? $.ajax({ method: "GET", url: "test.js", dataType: "script" });
Correct Answer:
Load and execute the JavaScript file
Note: This Question is unanswered, help us to find answer for this one
Which of the following method can be used to delete node from DOM tree?
Correct Answer:
removeNode()
Note: This Question is unanswered, help us to find answer for this one
Which of the following numbers, in callback function of request object, can be tested against request.readyState to make sure that server has finished processing request?
Correct Answer:
4
Note: This Question is unanswered, help us to find answer for this one
Which of the following jQuery AJAX function is used to set default values for future AJAX requests?
Correct Answer:
jQuery.ajaxSetup()
Note: This Question is unanswered, help us to find answer for this one
Which of the following is true for asynchronous requests and response?
Correct Answer:
Never count on the ORDER or SEQUENCE of requests and responses in asynchronous applications.
If you’re making TWO separate requests, use TWO separate request objects.
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Which of the following javascript functions can be used to convert JSON string into object?
Correct Answer:
JSON.parse()
Note: This Question is unanswered, help us to find answer for this one
Which of the following benefits can AJAX provide to Web Applications?
Correct Answer:
The browser can request multiple things from the server at the same time.
Browser requests return a lot faster.
Only the parts of the page that actually change are updated.
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Which of the following is the correct way to assign events to HTML elements using JavaScript?
Correct Answer:
document.getElementById("Btn").onclick = functionName;
Note: This Question is unanswered, help us to find answer for this one
Which of the following request object method can be assigned a callback function which will be called every time the server updates the browser on the request its processing?
Correct Answer:
request.onreadystatechange
Note: This Question is unanswered, help us to find answer for this one
How to use Basic Auth with jQuery and AJAX?aja
Correct Answer:
Both of the above
Note: This Question is unanswered, help us to find answer for this one
Which of the following may be a disadvantage of using AJAX?
Correct Answer:
All of the above
Note: This Question is unanswered, help us to find answer for this one
Which of the following is not supported in AJAX?
Correct Answer:
Flash
Note: This Question is unanswered, help us to find answer for this one
How to make a cross-domain Ajax call?
Correct Answer:
By using both JSONP and CORS
Note: This Question is unanswered, help us to find answer for this one
Which of the following is true about jQuery.get() method?
Correct Answer:
Load data from the server using an HTTP GET request
Note: This Question is unanswered, help us to find answer for this one
Which one of these technologies is NOT used in AJAX?
Correct Answer:
Flash
Note: This Question is unanswered, help us to find answer for this one
Your ajax requests are giving you cross site scripting issues, choose the best method below to get around this
Correct Answer:
Run a proxy script on your own server that fetches the content from the external site and pipes it back to the browser
Note: This Question is unanswered, help us to find answer for this one
How do you know that an AJAX request has completed?
Correct Answer:
XHR.readyState is 4 and the XHR.status is 200
Note: This Question is unanswered, help us to find answer for this one
After all referenced files are loaded and parsed, the browser triggers the _____ event?
Correct Answer:
window.onload
Note: This Question is unanswered, help us to find answer for this one
For the following code fragment object.property(); choose the option that is correct
Correct Answer:
When you get the property from the object and call it in one go, the object will be the context for the method
Note: This Question is unanswered, help us to find answer for this one
What is the correct way to implement GET request using AJAX?
Correct Answer:
xhttp.open(“GET”, “demo_get.asp”, true); xhttp.send();
Note: This Question is unanswered, help us to find answer for this one
Which of the following callback hooks is not provided by jQuery AJAX?
Correct Answer:
finish
Note: This Question is unanswered, help us to find answer for this one
Which of the following are valid for addEventListener() method?
Correct Answer:
All of the above
Note: This Question is unanswered, help us to find answer for this one
This __ event tells the browser to call the checkUsername() function when the user leaves the username field on the form.
Correct Answer:
onblur
Note: This Question is unanswered, help us to find answer for this one
.................... stores a function (or the name of a function) to be called automatically each time the readyState property changes.
Correct Answer:
onreadystatechange
Note: This Question is unanswered, help us to find answer for this one
Which of the following statements are true for AJAX graceful degradation?
Correct Answer:
Start out by designing a JavaScript-free site.
Use elements and Submit buttons
Write server-side programs that don’t assume Ajaxian requests.
Test your pages on non-javascript browsers
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
If an AJAX request made using jQuery fails,
Correct Answer:
the programmer should arrange for it to be reported using the jQuery .fail() method
Note: This Question is unanswered, help us to find answer for this one
How does Crockford's json2.js libary support Graceful Degradation?
Correct Answer:
Crockford's JSON library will only define JSON.stringify and JSON.parse if they're not already defined, leaving any browser native implementation intact.
Note: This Question is unanswered, help us to find answer for this one
Choose the most correct statement to describe Graceful Degradation.
Correct Answer:
A design that allows web pages to be available in a basic functional format for limited-capability web browsers
Note: This Question is unanswered, help us to find answer for this one
Which of the following are HTTP request headers?
Correct Answer:
Accept-Charset
Authorization
Referrer
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Which of the following is not a callback hooks provided by $.ajax()?
Correct Answer:
failure
Note: This Question is unanswered, help us to find answer for this one
What is the difference between XMLHttpRequest and ActiveXObject? variable = new XMLHttpRequest(); variable = new ActiveXObject("Microsoft.XMLHTTP");
Correct Answer:
ActiveXObject is for old browser such as IE5, IE6, XMLHttpRequest is for modern browser
Note: This Question is unanswered, help us to find answer for this one
How many status of the XMLHttpRequest are there?
Correct Answer:
Five : from 0 to 4
Note: This Question is unanswered, help us to find answer for this one
Which of the following JavaScript DOM traversal method works with an XML Document object?
Correct Answer:
getElementsByTagName
Note: This Question is unanswered, help us to find answer for this one
Which of the following JavaScript DOM traversal methods work with an XML Document object?
Correct Answer:
getElementsByTagName
Note: This Question is unanswered, help us to find answer for this one
To get a list of all elements with class="intro" which of the following can be used?
Correct Answer:
document.querySelectorAll("p.intro");
Note: This Question is unanswered, help us to find answer for this one
__ function returns a JavaScript object that represents an XHTML element
Correct Answer:
getElementById()
Note: This Question is unanswered, help us to find answer for this one
To prevent DOM based XSS attacks when JSON is returned in response, which of the following is not correct?
Correct Answer:
Use the eval() function to parse JSON.
Note: This Question is unanswered, help us to find answer for this one
Which of the answer is correct to send following data with request?
var requestData = "username=" + escape(document.getElementById("username").value) + "&password=" + escape(document.getElementById("password1").value) + "&firstname=" + escape(document.getElementById("firstname").value) + "&lastname=" + escape(document.getElementById("lastname").value) + "&email=" + escape(document.getElementById("favorite").value);
Correct Answer:
abcRequest.open("POST", url, true); abcRequest.send(requestData);
Note: This Question is unanswered, help us to find answer for this one
LiveWire JavaScript is also called server-side _____.
Correct Answer:
JavaScript
Note: This Question is unanswered, help us to find answer for this one
Which of the following is not a valid XMLHttpRequest Property?
Correct Answer:
requestText
Note: This Question is unanswered, help us to find answer for this one
Which of the following readyState Object Status is not correct?
Correct Answer:
0 = initialized
Note: This Question is unanswered, help us to find answer for this one
Which of the following methods are available for XMLHttpRequest?
Correct Answer:
getResponseHeader(headerName)
open(method, URL)
open(method, URL, async, username, password)
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
The jQuery AJAX methods .get(), .post(), and .ajax() all require which parameter to be supplied?
Correct Answer:
url
Note: This Question is unanswered, help us to find answer for this one
How to perform a synchronous AJAX request in jQuery?
Correct Answer:
In AJAX request, set async: false
Note: This Question is unanswered, help us to find answer for this one
True or False: By default, all AJAX requests are sent asynchronously.
Correct Answer:
True
Note: This Question is unanswered, help us to find answer for this one
If something goes wrong at the server __ property of request object tell us about it.
Correct Answer:
status
Note: This Question is unanswered, help us to find answer for this one
Can an AJAX response set a cookie?
Correct Answer:
Yes
Note: This Question is unanswered, help us to find answer for this one
Which of the following JavaScript object performs asynchronous interaction with the server?
Correct Answer:
XMLHttpRequest
Note: This Question is unanswered, help us to find answer for this one
Which of the following XMLHttpRequest properties are correct?
Correct Answer:
readyState
responseText
statusText
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Which of the following is not a valid data type that AJAX expects to get from server?
Correct Answer:
sql
Note: This Question is unanswered, help us to find answer for this one
A callback function is a function passed as a parameter to another function.
Correct Answer:
True
Note: This Question is unanswered, help us to find answer for this one
Which of the following is true about callback function?
Correct Answer:
A callback function is a function that is executed when something else finishes.
In Ajax, it’s the function that’s called when the server responds to a request object. The browser “calls back” that function at a certain time.
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
True or False: If $.ajax() is called with the global option set to false, the $.ajaxStart() method will not fire.
Correct Answer:
True
Note: This Question is unanswered, help us to find answer for this one
AJAX has become very commonly used because
Correct Answer:
it allows page content to be updated without requiring a full page reload
Note: This Question is unanswered, help us to find answer for this one
Which option should be set in jQuery AJAX call to send a DOMDocument?
Correct Answer:
set processData to false
Note: This Question is unanswered, help us to find answer for this one
Which of the following are XMLHttpRequest object methods?
Correct Answer:
send()
open()
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Do AJAX requests retain session information?
Correct Answer:
Yes
Note: This Question is unanswered, help us to find answer for this one
Which of the following is a feature of AJAX?
Correct Answer:
All of the above
Note: This Question is unanswered, help us to find answer for this one
What will be XMLHttpRequest object 'status' when page was not found?
Correct Answer:
404
Note: This Question is unanswered, help us to find answer for this one
Which is true about jQuery.post() method?
Correct Answer:
Load data from the server using an HTTP POST request
Note: This Question is unanswered, help us to find answer for this one
Which of the following function is used to return specific header information from the server response?
Correct Answer:
getResponseHeader()
Note: This Question is unanswered, help us to find answer for this one
Full form of AJAX is
Correct Answer:
Asynchronous JavaScript and XML
Note: This Question is unanswered, help us to find answer for this one
Complete the following sentence. Using AJAX we can make our web page ___.
Correct Answer:
interactive and faster
Note: This Question is unanswered, help us to find answer for this one
Which of the following is true about onreadystatechange?
Correct Answer:
onreadystatechange is a function to be called automatically each time the readyState property changes
Note: This Question is unanswered, help us to find answer for this one
In Javascript, which of the following events can we set?
Correct Answer:
onabort
ondblclick
onresize
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Which of the following objects can be accessed from JavaScript code?
Correct Answer:
document
history
window
XMLHttpRequest
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
What is the correct syntax to include a script named myScript.js into a page?
Correct Answer:
<script src="myScript.js">
Note: This Question is unanswered, help us to find answer for this one
Is JavaScript the same as Java?
Correct Answer:
no
Note: This Question is unanswered, help us to find answer for this one
If the code is written using the Core Foundation and Foundation macros, the simplest way to create strings files is:
Correct Answer:
By using the genstrings command-line tool.
Note: This Question is unanswered, help us to find answer for this one
What is the common way to make a request with XMLHttpRequest?
Correct Answer:
myReq.send(null);
Note: This Question is unanswered, help us to find answer for this one
What language does AJAX use on the client side?
Correct Answer:
JavaScript
Note: This Question is unanswered, help us to find answer for this one
Which of the following is not a JavaScript operator?
Correct Answer:
All of the above are Javascript operators
Note: This Question is unanswered, help us to find answer for this one
document.write ("Hello"); will pop a dialog box with "Hello" in it.
Correct Answer:
false
Note: This Question is unanswered, help us to find answer for this one
In the following list, which states are valid?
XMLHttpRequest.readyState
Correct Answer:
All of the above.
Note: This Question is unanswered, help us to find answer for this one
The server returns data to the client during an AJAX postback. Which of the following is correct about the returned data?
Correct Answer:
It contains the data of the whole page
Note: This Question is unanswered, help us to find answer for this one
What is the correct syntax to create an array in JavaScript?
Correct Answer:
var array = [];
Note: This Question is unanswered, help us to find answer for this one
Which language does AJAX use on the server side?
Correct Answer:
Any language supported by the server
Note: This Question is unanswered, help us to find answer for this one
What should be called before 'send ()' to prepare an XMLHttpRequest object?
Correct Answer:
open ()
Note: This Question is unanswered, help us to find answer for this one
Can a client AJAX application be used to fetch and execute some JavaScript code?
Correct Answer:
yes
Note: This Question is unanswered, help us to find answer for this one
Can an AJAX application communicate with other applications on the client computer?
Correct Answer:
No
Note: This Question is unanswered, help us to find answer for this one
Is it possible to make some system calls on the client with AJAX?
Correct Answer:
No
Note: This Question is unanswered, help us to find answer for this one
Is it possible to access the browser cookies from a javascript application?
Correct Answer:
yes
Note: This Question is unanswered, help us to find answer for this one
Is the loading of an AJAX enabled web page any different from the loading of a normal page?
Correct Answer:
No
Note: This Question is unanswered, help us to find answer for this one
Does JavaScript 1.5 have exception handling?
Correct Answer:
no
Note: This Question is unanswered, help us to find answer for this one
What is the third (async) parameter of the XMLHttpRequest open method?
Correct Answer:
If true, the send method returns immediately
If true, the send method returns immediately
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
When may asynchronous requests be used?
Correct Answer:
All of the above
Note: This Question is unanswered, help us to find answer for this one
Which of the following browsers provide XMLHttpRequest property?
Correct Answer:
Internet Explorer 7
Note: This Question is unanswered, help us to find answer for this one
Is it possible to create and manipulate an image on the client with AJAX?
Correct Answer:
yes
Note: This Question is unanswered, help us to find answer for this one
Can AJAX be used to move files on the client-side?
Correct Answer:
No
Note: This Question is unanswered, help us to find answer for this one
Which of the following are drawbacks of AJAX?
Correct Answer:
The browser back button cannot be used in most cases
Note: This Question is unanswered, help us to find answer for this one
Which of the following status codes denotes a server error?
Correct Answer:
501
Note: This Question is unanswered, help us to find answer for this one
Is it always possible to make requests to multiple websites with different domain names from an AJAX client script?
Correct Answer:
no
Note: This Question is unanswered, help us to find answer for this one
It might be needed to set the request content-type to XML explicitly. How can you do so for an XMLHttpRequest Object?
Correct Answer:
myReq.setRequestHeader ("Content-Type", "text/xml");
Note: This Question is unanswered, help us to find answer for this one
Which of the following is a block comment in JavaScript?
Correct Answer:
/* */
Note: This Question is unanswered, help us to find answer for this one
Can AJAX be used with offline pages?
Correct Answer:
yes
Note: This Question is unanswered, help us to find answer for this one
Which of the following is/are true regarding AJAX?
Correct Answer:
Which of the following is/are true regarding AJAX?
Note: This Question is unanswered, help us to find answer for this one
What is the correct way to execute the function "calc()" when an XMLHttpRequest is loaded?
Correct Answer:
myRequest.onreadystatechange = calc;
Note: This Question is unanswered, help us to find answer for this one
When doing an AJAX request, will the page be scrolled back to top as with normal requests?
Correct Answer:
No
Note: This Question is unanswered, help us to find answer for this one
Can you call responseBody or responseText to get a partial result when the readyState of an XMLHttpRequest is 3(receiving)?
Correct Answer:
No
Note: This Question is unanswered, help us to find answer for this one
Which attribute of the SCRIPT tag can be used to hold the JavaScript version?
Correct Answer:
LANGUAGE
Note: This Question is unanswered, help us to find answer for this one
Which of the following cannot be resolved by using AJAX?
Correct Answer:
None of the above
Note: This Question is unanswered, help us to find answer for this one
Which of the following is not a valid variable name in JavaScript?
Correct Answer:
2myVar
Note: This Question is unanswered, help us to find answer for this one
Which of the following is/are not addressed by AJAX?
Correct Answer:
Offline browsing
Note: This Question is unanswered, help us to find answer for this one
When a user views a page with JavaScript in it, which machine executes the script?
Correct Answer:
The client machine running the Web Browser
Note: This Question is unanswered, help us to find answer for this one
Which of the following request types should be used with AJAX?
Correct Answer:
HTTP GET request for retrieving data (which will not change for
that URL)
Note: This Question is unanswered, help us to find answer for this one
What is true regarding XMLHttpRequest.abort()?
Correct Answer:
It can only be used with async requests
Note: This Question is unanswered, help us to find answer for this one
Can WebDav methods like PROPFIND be used with XMLHttpRequest.open()?
Correct Answer:
Yes
Note: This Question is unanswered, help us to find answer for this one
The X in AJAX refers to XML, but is it possible to make a request for plain text data by using AJAX?
Correct Answer:
yes
Note: This Question is unanswered, help us to find answer for this one
Is it possible to make a page "reload-safe" when using AJAX?
Correct Answer:
yes, if each AJAX request modifies the server side context,
which would render a page similar to the actual JS modified
page, if reloaded.
Note: This Question is unanswered, help us to find answer for this one
You want to update the following element with the XMLHttpRequest status.
Which of the following approaches is correct for the purpose?
<div id="statusCode"></div>
Correct Answer:
var myDiv = document.getElementById ("statusCode");
myDiv.innerHTML = req.status;
Note: This Question is unanswered, help us to find answer for this one
Can an HTML form be sent with AJAX?
Correct Answer:
yes
Note: This Question is unanswered, help us to find answer for this one
What is NOSCRIPT tag for?
Correct Answer:
To enclose text to be displayed if the browser doesn't support
JS
Note: This Question is unanswered, help us to find answer for this one
which of the following list is/are true regarding AJAX?
Correct Answer:
It can only be implemented with the XMLHttpRequest object
Note: This Question is unanswered, help us to find answer for this one
How can you create an XMLHttpRequest under Internet Explorer 6?
Correct Answer:
var oReq = new ActiveXObject ("MSXML2.XMLHTTP.3.0");
Note: This Question is unanswered, help us to find answer for this one
Can AJAX be used with PHP?
Correct Answer:
yes
Note: This Question is unanswered, help us to find answer for this one
Which of the following navigator properties is the same in both Netscape and IE?
Correct Answer:
navigator.appCodeName
Note: This Question is unanswered, help us to find answer for this one
In the following list, which ones are used to fetch the result data of an XMLHttpRequest?
Correct Answer:
responseBody
Note: This Question is unanswered, help us to find answer for this one
Javascript uses static bindings.
Correct Answer:
false
Note: This Question is unanswered, help us to find answer for this one
Which of the following describes the term 'Asynchronous' correctly?
Correct Answer:
Ability to handle processes independently from other processes
Note: This Question is unanswered, help us to find answer for this one
Can you start multiple threads with JavaScript?
Correct Answer:
Yes
Note: This Question is unanswered, help us to find answer for this one
Can AJAX be used with HTTPS (SSL)?
Correct Answer:
yes
Note: This Question is unanswered, help us to find answer for this one
What is the standardized name of JavaScript?
Correct Answer:
ECMAScript
Note: This Question is unanswered, help us to find answer for this one
The format of an HTTP request is given below:
<request-line>
<headers>
<blank line>
[<request-body>]
Which of the following is not passed in the request-line?
Correct Answer:
Browser name
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Init()
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
2
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
withCredentials
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
null
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
execute other scripts while waiting for server response
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
state
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
"arraybuffer" or "blob"
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
aria-live
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
It makes server response text act like an injected <script> element
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
overrideMimeType()
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
the onerror event
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Your request was canceled either due to a failed connection or a user action.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
3
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Access-Control-Allow-Origin
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
The XHR object will automatically and transparently follow the redirects to the new location for the resource, unless it's on a different domain.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
asynchronous and XML
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
HTTP method as string, URL as string
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
The Ajax callback function will be queued until the currently-running code completes
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Cross-browser compatibility
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
responseXML
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
The server is returning an unencapsulated JSON object which is being executed as JSONP
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
CONNECT, TRACE, or TRACK
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Client-side code is inherently insecure
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
4 (readystate complete)
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
xhr.open("GET", "/resource", false);
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Callback functions are used with "asynchronous" requests only
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Use Ajax to progressively enhance server-side processing, rather than to replace it
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
onreadystatechange
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
All of these
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Malicious client-side code injection
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
new XDomainRequest();
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Cross-origin resource sharing
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
XDomainRequest
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
This code is polling a timer rather using the onreadystatechange event to check the state of the async request.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
JSON.stringify(dataToSend);
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
as text/html
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
False
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Yes, but only when using newer browsers and HTML5 features.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
In newer browsers cross-domain requests can be configured but only when servers use special headers to explicitly allow some cross domain requests.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
False
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
A data serialization and interchange format using a subset of JavaScript syntax
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Yes, in newer browsers using the responseType property and in older browsers by overriding the mime type of the response.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
X-Requested-With: XMLHttpRequest
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Using setTimeout(), clearTimeout() and .abort()
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
False
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
False
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
JSON.parse(returnedData);
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
the status of the asynchronous request changes.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
200
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
setRequestHeader
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
It allows web applications to send asynchronous data requests to a server without a user initiated page load.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Better cross-browser compatibility and faster speed of development
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Events and callbacks
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
binary large object
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
The history API with pushState, replaceState and history events.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
history.pushState()
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Domain name, protocol, and port
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
To keep a server connection open for two-way communication
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
.status returns a numeric-only code instead of the full HTTP response, which can be found in .statusText
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Yes, it is possible. setRequestHeader() method of XMLHttpRequest object can be used to add a custom HTTP header
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
GET, POST, PUT, and DELETE
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Hypertext Transfer Protocol, HTTP
Note: This Question is unanswered, help us to find answer for this one
Ajax MCQs | Topic-wise