Question: 01
Is JavaScript the same as Java?


    a.     yes
    b.     no


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


    a.     _my_var
    b.     2myVar
    c.     MY_VAR
    d.     __MyVar2__
    e.     All are valid


Question: 03
Which HTTP server does AJAX require?


    a.     Apache
    b.     Sun application server
    c.     lighttpd
    d.     Microsoft web server
    e.     Any HTTP server will work


Question: 04
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?

    a.     Type of request
    b.     Resource to access
    c.     Version of HTTP
    d.     Browser name
    e.     None of the above


Question: 05
How can you create an XMLHttpRequest under Internet Explorer 6?


    a.     var oReq = new XMLHttpRequest ();
    b.     var oReq = new ActiveXObject ("MSXML2.XMLHTTP.3.0");
    c.     var oReq = new IEHttpRequest ("XML");
    d.     None of the above


Question: 06
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


Question: 07
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


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


    a.     yes
    b.     no


Question: 09
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, iFrames...)
    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


Question: 10
Which of the following navigator properties is the same in both Netscape and IE?


    a.     navigator.appName
    b.     navigator.appCodeName
    c.     navigator.appVersion
    d.     navigator.userAgent
    e.     None of the above


Question: 11
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.getElementById ("statusCode");
myDiv.innerHTML = req.statusCode;
    b.     var myDiv = document.getElementById ("statusCode");
myDiv.innerHTML = req.status;
    c.     var myDiv = document.getElementById ("statusCode");
myDiv.setStatus (req.statusCode);
    d.     var myDiv = document.getElementById ("statusCode");
myDiv.status = req.status;
    e.     None of the above


Question: 12
Which of the following describes the term 'Asynchronous' correctly?


    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


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


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


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


    a.     true
    b.     false


Question: 15
What is the correct syntax to include a script named myScript.js into a page?


    a.     <script href="myScript.js">
    b.     <script name="myScript.js">
    c.     <script src="myScript.js">
    d.     <script root="myScript.js">


Question: 16
Can an HTML form be sent with AJAX?


    a.     yes
    b.     no


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


    a.     Yes
    b.     No


Question: 18
Can WebDav methods like PROPFIND be used with XMLHttpRequest.open()?


    a.     Yes
    b.     No


Question: 19
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


Question: 20
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


Question: 21
What is the standardized name of JavaScript?


    a.     Java
    b.     NetscapeScript
    c.     ECMAScript
    d.     XMLScript
    e.     WebScript


Question: 22
Which of the following browsers provide XMLHttpRequest property?

    a.     Internet Explorer 5
    b.     Internet Explorer 6
    c.     Internet Explorer 7
    d.     Firefox 2.0
    e.     Safari 3.0


Question: 23
What is the common way to make a request with XMLHttpRequest?


    a.     myReq.request();
    b.     myReq.get();
    c.     myReq.post(null);
    d.     myReq.send(null);
    e.     myReq.sendRequest(null);


Question: 24
Can you start multiple threads with JavaScript?


    a.     Yes
    b.     No


Question: 25
What is the correct way to execute the function "calc()" when an XMLHttpRequest is loaded?


    a.     myRequest.onreadystatechange = calc;
    b.     myRequest.onload = calc;
    c.     myRequest.execute = calc;
    d.     myRequest.addCallback (calc, "loaded");
    e.     None of the above


Question: 26
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


Question: 27
In the following list, which ones are used to fetch the result data of an XMLHttpRequest?


    a.     responseData
    b.     responseBody
    c.     responseString
    d.     responseText
    e.     responseXML


Question: 28
Which of the following is a block comment in JavaScript?


    a.     <!-- -->
    b.     /* */
    c.     //
    d.     #
    e.     --[[ ]]


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


    a.     Yes
    b.     No


Question: 30
Which of the following cannot be resolved by using AJAX?


    a.     Partial page processing
    b.     Unresponsiveness of web pages
    c.     Server side communication initiation
    d.     Server crashes (failover)
    e.     None of the above


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

    a.     yes
    b.     no


Question: 32
Can AJAX be used with offline pages? (like a downloadable documentation)


    a.     yes
    b.     no


Question: 33
In the following list, which states are valid?


XMLHttpRequest.readyState

    a.     0, The request is not initialized
    b.     1, The request has been set up
    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.


Question: 34
Can AJAX be used with PHP?


    a.     yes
    b.     no


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


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


Question: 36
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


Question: 37
It might be needed to set the request content-type to XML explicitly. How can you do so for an XMLHttpRequest Object?


    a.     myReq.setContentType ("text/xml");
    b.     myReq.contentType = "text/xml";
    c.     myReq.overrideContentType ("xml");
    d.     myReq.contentType = "xml";
    e.     myReq.setRequestHeader ("Content-Type", "text/xml");


Question: 38
Which of the following is not a JavaScript operator?


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


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


    a.     yes
    b.     no


Question: 40
Is it possible to make a page "reload-safe" when using AJAX?


    a.     no
    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.

Don't Miss A Single Updates

Remember to check your email account to confirm your subscription.

Blogger
Disqus
Post a comment ➜

No Comment