Programming Flashcards
1
Q
Intranet
A
- internal website that only employees can see and use
2
Q
readyState property
A
- hold numbers 0-4
- # represents each state of the AJAX request
- 4 = browser has received all of the data from the server
3
Q
status and statusText properties
A
- # sent from server
- 200 = OK
- 401 = Access denied
- 404 = File not found
- 500 = Internal server error
4
Q
JSON
A
- JavaScript Object Notation
- array or object format
- object key/property names and string values both require double quotes
[{ “name” : “Dave”,
“inoffice” : true }]
5
Q
responseText property
A
- information that web server returns
6
Q
JSON.parse
A
- method that takes a string and tries to convert it to a JavaScript object
7
Q
Processing JSON Data
A
- Create a new HTML list item
- Check the “inoffice” property
- Get the value for the “name” property; Insert it inside the <li> tag
- Close the <li> tag
var employees = JSON.parse(xhr.responseText); var statusHTML = '<ul class="bulleted">'; for (var i=0; i.innerHTML = statusHTML; } };