Professional Documents
Culture Documents
AJAX Technology Notes: Prepared By:Mrs - Bijal Thaker (Asst - Prof, MUCC)
AJAX Technology Notes: Prepared By:Mrs - Bijal Thaker (Asst - Prof, MUCC)
Prepared By:Mrs.Bijal
Thaker(Asst.Prof, MUCC)
Ajax is Asynchronous JavaScript
and XML
It is not a programming language but
a technique to make a page
interactive.
About AJAX
(Ajax callback)
Q. What do the different readystates in
XMLHttpRequest?
0 Ajax Request not initialized
1 Ajax Request's server connection established
2 Ajax Request received
3 Ajax Request processing
4 request finished and response is ready.
Q. Diff between synchronous and
asynchronous request
• synchronous: user must wait while new pages
load the typical communication pattern used
in web pages (click, wait, refresh=event
handler)
• Asynchronous : (process will be carried out in
the background) user don’t need to wait, user
can keep interacting with page while data
loads
Q. Advantage of AJax?
• Its faster as it load only required content.
• More user friendly.
• Reduce the loading of page.
• Increases speed.
Q. What type of response we can get in Ajax
Response?
• text data
• html data
• JSON data
• XML data
Property description
Status the request's HTTP error
code (200 = OK)
statusText HTTP error code text
responseText the entire text of the
fetched file, as a String
responseXML the entire contents of the
fetched file, as a DOM tree
Q.How to use Ajax in JavaScript program
Example:
var xhttp=new XMLHttpRequest();
Ajax is used with combination of
following technologies:
Css
JavaScript
DOM
Xmlhttprequest