Educate yourself online!

Attention!

For new updates please visit http://www.shortquiz.blogspot.com


AJAX Test

By on 22:09

AJAX Test


Is it possible to access the browser cookies from a javascript application?

a. Yes
b. No

What is NOSCRIPT tag for?

a. To prevent the page scripts from executing
b. To shield a part of a page from being modified by JS (like aDiv innerHTML = 'something' has no effect)
c. To enclose text to be displayed if the browser doesn't support JS
d. NOSCRIPT tag doesn't exist
e. None of the above

Can you call responseBody or response Text to get a partial result when the ready State of an XMLHttpRequest is 3(receiving)?

a. Yes
b. No

Is it always possible to make requests to multiple websites with different domain names from an AJAX client script?

a. Yes
b. No

How can you create an XMLHttpRequest under Internet Explorer 6?

a. varoReq = new XMLHttpRequest ()
b. var oReq = new ActiveXObject ("MSXML2 XMLHTTP 3 0")
c. varoReq = new lEHttpRequest("XML")
d. None of the above

Can AJAX be used with offline pages?

a. Yes
b. No

Is it possible to make some system calls on the client with AJAX?

a. Yes
b. No

Which of the following request types should be used with AJAX?

a. HTTP GET request for retrieving data (which will not change for that URL)
b. HTTP POST request for retrieving data (which will not change for that URL)
c. HTTP GET should be used when the state is updated on the server
d. HTTP POST should be used when the state is updated on the server

When doing an AJAX request, will the page be scrolled back to top as with normal requests?

a. Yes
b. No

The server returns data to the client during an AJAX postback Which of the following is correct about the returned data?

a. It only contains the data of the page elements that need to be changed
b. It contains both the data of the whole page and the data that needs to be changed in separate blocks
c. It contains the data of the whole page
d. It may contain anything
e. None of the above

Which of the following is a block comment in JavaScript?

a. <!-- --> O
b. /**/
C.  //
d. #
e. –[[ ]]

Can AJAX be used to move files on the client-side?

a. Yes
b. No

Can you start multiple threads with JavaScript?

a. Yes
b. No

document. write ("Hello");  will pop a dialog box with "Hello" in it

a. True
b. False

When may asynchronous requests be used?

a. To submit data to the server
b. To retrieve data from the server
c. To load additional code from the server
d. To download an image
e. All of the above

Can AJAX be used with HTTPS (SSL)?

a. Yes
b. No

Is JavaScript the same as Java?

a. Yes
b. No

Which of the following status codes denotes a server error'?

a. 100
b. 200
c. 300
d. 501
e. 500

Does JavaScript 1.5 have exception handling?

a. Yes
b. No

Which of the following list is/are true regarding AJAX?

a. It can only be implemented with the XMLHttpRequest object
b. It can be used to update parts of a webpage without reloading it
c. It can be used to make requests to the server without blocking the user (async)
d. It requires a special AJAX enabled web server
e. It cannot be used under Internet Explorer

Is the loading of an AJAX enabled web page any different from the loading of a normal page?

a. No
b. Yes

Which of the following is/are true regarding AJAX?

a. It's an engine developed by Microsoft to load web pages faster
b. It's merely a concept with many implementation methods (XMLHttpRequest, iF rames…)
c. It's a server side scripting language used to serve partial parts of a webpage
d. It's a good way to reduce network traffic, if used correctly
e. None of the above

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>

a. var myDiv = document getElementByld ("statusCode') myDiv.innerHTML = req. statusCode;
b. var myDiv = document getElementByld ("statusCode') myDiv.innerHTML = req. status;
c. var myDiv = document getElementByld ("statusCode') myDiv.setStatus (req. statusCode);
d. var myDiv = document getElementByld ("statusCode') myDiv.status = req. status,
e. None of the above

In the following list, which states are valid?

XMLHttpRequest readyState

a. 0, The request is not initialized
b. 1, The request has been setup
c. 2, The request has been sent
d. 3, The request is in process
e. 4, The request is complete
f. All of the above

What should be called before 'send ()' to prepare an XMLHttpRequest object?

a. prepare ()
b. open ()
c. init()
d. build ()
e. None of the above

Is it possible to create and manipulate an image on the client with AJAX?

a. Yes
b. No

When a user views a page with JavaScript in it, which machine executes the script?

a. The client machine running the Web Browser
b. The server serving the JavaScript
c. A central JavaScript server like root DNS
d. None of the above

What is the standardized name of JavaScript?

a. Java
b. NetscapeScnpt
c. ECMAScnpt
d. XMLScnpt
e. WebScnpt

Which of the following describes the term 'Asynchronous' correctly1?

a. Ability to handle processes independently from other processes
b. Processes are dependent upon other processes
c. Processes are not fully dependent on other processes
d. None of the above

Can a client AJAX application be used to fetch and execute some JavaScript code?

a. Yes
b. No

Can an HTML form be sent with AJAX?

a. Yes
b. No

What is the correct way to have the function checkState called after 10 seconds'?

a. window.setTimeout(checkState, 10)
b. window.setTimeout(checkState, 10000)
c. window.setTimeout(checkState(), 10)
d. None of the above

What is the correct syntax to create an array in JavaScript?

a. var array = Array new
b. var array = D
c. var array = new Array
d. var array = new Array ()
e. None of the above

Which of the following are drawbacks of AJAX?

a. The browser back button cannot be used in most cases
b. It makes the server and client page representation synchronization more difficult
c. It loads the server too much
d. It's not supported by older browsers
e. It augments the used bandwidth significantly

Javascript uses static bindings

a. True
b. False

Which of the following is/are not addressed by AJAX?

a. Partial page update
b. Offline browsing
c. Server side scripting
d. All of the above

Can an AJAX application communicate with other applications on the client computer?

a. Yes
b. No

Which of the following is not a valid variable name in JavaScript?

a. _my_var
b. 2rnyVar
c. MY_VAR
d. _MyVar2_
e. All are valid

Consider the following function:

function foo ()
{
 return 5,
}

What will the following code do?

var myVar = foo,

a. Assign the integer 5 to the variable myVar
b. Assign the pointer to function foo to myVar
c. Do nothing
d. Throw an exception
e. None of the above

Which of the following is not a JavaScript operator?

a. new
b. delete
c. this
d. type of
e. All of the above are Javascript operators

0 comments:

Post a Comment