HTML and CSS Reference
In-Depth Information
Correct answer: D
3.
Incorrect: Credentials aren't passed with the open method.
A.
Incorrect: Credentials aren't passed with the request method.
B.
Incorrect: Ready state is a property that indicates the current state of the
connection.
C.
Correct: Credentials are passed only if the server requests them with a return
code 401.
D.
Objective 3.4: Thought experiment
In this application, you now need to know when users finish entering information into a field.
You can use the onblur event for this. By hooking up onblur to the email field, you can use the
XMLHttpRequest object to send a request to the server to validate that the address is unique
and hasn't been used before. The results of the data evaluation on the server are passed back
in the response and can be used to highlight to users that the data isn't unique. This provides
a much better user experience in that users don't need to wait until they fill out the entire
form to have all the fields validated. Did you remember to encode the data before submitting
it to the server to prevent an injection attack?
Objective 3.4: Review
Correct answer: C
1.
Incorrect: This isn't a valid method on the JSON object.
A.
Incorrect: This method is used to serialize an object into a JSON string.
B.
Correct: This method is used to deserialize a JSON string into an object.
C.
Incorrect: This isn't a valid method on the JSON object.
D.
Correct answer: D
2.
Incorrect: 'binary' isn't a valid option for the responseType .
A.
Incorrect: 'image/jpg' isn't a valid option for the responseType .
B.
Incorrect: type isn't a valid property name on the response object.
C.
Correct: The response object's responseType property must be set to 'blob' .
D.
Search WWH ::




Custom Search