AJAX Flashcards
1
Q
What is the purpose of ajax
A
technique that enables a page to request/submit data without reloading a page or postback
2
Q
what is postback
A
when data is sent from browser to page (and typically new page is needed)
3
Q
instantiate an XhtmlHttpRequest object
A
var xhr = new XhtmlHttpRequest();
4
Q
using XHR, open a GET request to fetch google.com’s home page
A
xhr.open(“GET”, “http://www.google.com/”, false);
5
Q
send an xhr request with null data
A
xhr.send(null);
6
Q
Check if an xhr request returns a succesfull request
A
if (xhr.status == 200)
7
Q
how can you find an xhr response’s plain text
A
xhr.responseText
8
Q
how can you find an xhr status
A
xhr.statusText