SlideShare a Scribd company logo
2
Most read
3
Most read
6
Most read
AJAX -
Asynchronous JavaScript
and XML
Arulkumar Varatharajan – AP/CSE
AJAX
AJAX
new technique for creating better, faster,
and more interactive web applications
with the help of XML, HTML, CSS, and
Java Script.
2
AJAX,
is a web development
technique for creating
interactive web applications.
AJAX
3
AJAX,
AJAX is based on the following open standards
•Browser-based presentation using HTML and Cascading Style
Sheets (CSS).
•Data is stored in XML format and fetched from the server.
•Behind-the-scenes data fetches using XMLHttpRequest objects in
the browser.
•JavaScript to make everything happen.
AJAX - XMLHttpRequest
4
AJAX,
XMLHttpRequest (XHR) is an API that can be used by JavaScript,
JScript, VBScript, and other web browser scripting languages to
transfer and manipulate XML data to and from a webserver.
It using HTTP, establishing an independent connection channel
between a webpage's Client-Side and Server-Side.
AJAX - XMLHttpRequest
5
AJAX,
The data returned from XMLHttpRequest calls will often be provided
by back-end databases. Besides XML, XMLHttpRequest can be used
to fetch data in other formats, e.g. JSON or even plain text.
How AJAX works?
6
AJAX communicates with the server using XMLHttpRequest object. Let's try to understand the flow of ajax or how ajax
works by the image displayed below.
AJAX - XMLHttpRequest
7
AJAX, As you can see in the above example, XMLHttpRequest object plays a
important role.
-User sends a request from the UI and a javascript call goes to XMLHttpRequest
object.
-HTTP Request is sent to the server by XMLHttpRequest object.
-Server interacts with the database using JSP, PHP, Servlet, ASP.net etc.
-Data is retrieved.
-Server sends XML data or JSON data to the XMLHttpRequest callback function.
-HTML and CSS data is displayed on the browser.
XMLHttpRequest Methods- Call back
8
▰abort()Cancels the current request
▰getAllResponseHeaders()Returns the complete set of HTTP headers as a string.
▰getResponseHeader( headerName )Returns the value of the specified HTTP header.
▰open( method, URL )
open( method, URL, async )
open( method, URL, async, userName )
open( method, URL, async, userName, password )
▰The method parameter can have a value of "GET", "POST", or "HEAD". Other HTTP
methods, such as "PUT" and "DELETE" (primarily used in REST applications) may be
possible.
▰
XMLHttpRequest Methods- Call back
9
▰send( content )Sends the request.
▰setRequestHeader( label, value ) Adds a label/value pair to the HTTP header to be sent.
XMLHttpRequest Properties
10
▰Onreadystatechange An event handler for an event that fires at every state change.
▰readyState The readyState property defines the current state of the XMLHttpRequest object.
▰The following table provides a list of the possible values for the readyState property:
▰
11
THANKS!
Any questions?
You can find me at
@username & user@mail.me

More Related Content

PDF
PPT
Ajax Introduction
PPT
Using xml in a data set (ado.net)
PPTX
Asp.net
PPTX
PPT
Hatkit Project - Datafiddler
PPTX
Introduction to mongo db
Ajax Introduction
Using xml in a data set (ado.net)
Asp.net
Hatkit Project - Datafiddler
Introduction to mongo db

What's hot (11)

PDF
U C2007 My S Q L Performance Cookbook
PPTX
Synapse india basic php development part 1
PDF
Updating materialized views and caches using kafka
PDF
Replicating application data into materialized views
PPTX
Javascript in C# for Lightweight Applications
PPTX
Ajax xml json
PDF
11 schema design & crud
PDF
Introduction to mongo db by zain
PPTX
Mongo db
U C2007 My S Q L Performance Cookbook
Synapse india basic php development part 1
Updating materialized views and caches using kafka
Replicating application data into materialized views
Javascript in C# for Lightweight Applications
Ajax xml json
11 schema design & crud
Introduction to mongo db by zain
Mongo db
Ad

Similar to Ajax (20)

PPTX
Unit-5.pptx
PPT
PPTX
Web-Engineering-Lec-14 (1) .pptx
PPTX
Web-Engineering-Lec-14 (1 ).pptx
DOCX
Copy of ajax tutorial
PPTX
Introduction to ajax
PPTX
AJAX.pptx
PPTX
Implementing AJAX in PHP. Asynchronous JavaScript and XML
PPTX
AJAX.pptx
PPT
AJAX
PPTX
Ajax
PPT
PPTX
PDF
M6 l8-ajax-handout
PPT
SynapseIndia dotnet development ajax client library
PPT
9781305078444 ppt ch11
PPTX
WEB TECHNOLOGY Unit-5.pptx
PDF
Ajax and xml
Unit-5.pptx
Web-Engineering-Lec-14 (1) .pptx
Web-Engineering-Lec-14 (1 ).pptx
Copy of ajax tutorial
Introduction to ajax
AJAX.pptx
Implementing AJAX in PHP. Asynchronous JavaScript and XML
AJAX.pptx
AJAX
Ajax
M6 l8-ajax-handout
SynapseIndia dotnet development ajax client library
9781305078444 ppt ch11
WEB TECHNOLOGY Unit-5.pptx
Ajax and xml
Ad

More from PhD Research Scholar (20)

PPTX
Quiz servlet
PPTX
servlet db connectivity
PPTX
2.java script dom
PPTX
1.java script
PPTX
Quiz javascript
PPTX
Thread&multithread
PPTX
Streams&io
PPTX
PPTX
Interface in java
PPTX
Inner classes in java
PPTX
PPTX
Exception handling
PPTX
Abstract class
PPTX
7. tuples, set & dictionary
PPTX
PPTX
4. functions
Quiz servlet
servlet db connectivity
2.java script dom
1.java script
Quiz javascript
Thread&multithread
Streams&io
Interface in java
Inner classes in java
Exception handling
Abstract class
7. tuples, set & dictionary
4. functions

Recently uploaded (20)

PDF
01-Introduction-to-Information-Management.pdf
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Business Ethics Teaching Materials for college
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
PDF
Basic Mud Logging Guide for educational purpose
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
Pharma ospi slides which help in ospi learning
PDF
VCE English Exam - Section C Student Revision Booklet
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
01-Introduction-to-Information-Management.pdf
Abdominal Access Techniques with Prof. Dr. R K Mishra
Business Ethics Teaching Materials for college
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
O7-L3 Supply Chain Operations - ICLT Program
O5-L3 Freight Transport Ops (International) V1.pdf
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
Module 4: Burden of Disease Tutorial Slides S2 2025
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
Basic Mud Logging Guide for educational purpose
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Pharma ospi slides which help in ospi learning
VCE English Exam - Section C Student Revision Booklet
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
STATICS OF THE RIGID BODIES Hibbelers.pdf
human mycosis Human fungal infections are called human mycosis..pptx
2.FourierTransform-ShortQuestionswithAnswers.pdf
Renaissance Architecture: A Journey from Faith to Humanism

Ajax

  • 1. AJAX - Asynchronous JavaScript and XML Arulkumar Varatharajan – AP/CSE
  • 2. AJAX AJAX new technique for creating better, faster, and more interactive web applications with the help of XML, HTML, CSS, and Java Script. 2 AJAX, is a web development technique for creating interactive web applications.
  • 3. AJAX 3 AJAX, AJAX is based on the following open standards •Browser-based presentation using HTML and Cascading Style Sheets (CSS). •Data is stored in XML format and fetched from the server. •Behind-the-scenes data fetches using XMLHttpRequest objects in the browser. •JavaScript to make everything happen.
  • 4. AJAX - XMLHttpRequest 4 AJAX, XMLHttpRequest (XHR) is an API that can be used by JavaScript, JScript, VBScript, and other web browser scripting languages to transfer and manipulate XML data to and from a webserver. It using HTTP, establishing an independent connection channel between a webpage's Client-Side and Server-Side.
  • 5. AJAX - XMLHttpRequest 5 AJAX, The data returned from XMLHttpRequest calls will often be provided by back-end databases. Besides XML, XMLHttpRequest can be used to fetch data in other formats, e.g. JSON or even plain text.
  • 6. How AJAX works? 6 AJAX communicates with the server using XMLHttpRequest object. Let's try to understand the flow of ajax or how ajax works by the image displayed below.
  • 7. AJAX - XMLHttpRequest 7 AJAX, As you can see in the above example, XMLHttpRequest object plays a important role. -User sends a request from the UI and a javascript call goes to XMLHttpRequest object. -HTTP Request is sent to the server by XMLHttpRequest object. -Server interacts with the database using JSP, PHP, Servlet, ASP.net etc. -Data is retrieved. -Server sends XML data or JSON data to the XMLHttpRequest callback function. -HTML and CSS data is displayed on the browser.
  • 8. XMLHttpRequest Methods- Call back 8 ▰abort()Cancels the current request ▰getAllResponseHeaders()Returns the complete set of HTTP headers as a string. ▰getResponseHeader( headerName )Returns the value of the specified HTTP header. ▰open( method, URL ) open( method, URL, async ) open( method, URL, async, userName ) open( method, URL, async, userName, password ) ▰The method parameter can have a value of "GET", "POST", or "HEAD". Other HTTP methods, such as "PUT" and "DELETE" (primarily used in REST applications) may be possible. ▰
  • 9. XMLHttpRequest Methods- Call back 9 ▰send( content )Sends the request. ▰setRequestHeader( label, value ) Adds a label/value pair to the HTTP header to be sent.
  • 10. XMLHttpRequest Properties 10 ▰Onreadystatechange An event handler for an event that fires at every state change. ▰readyState The readyState property defines the current state of the XMLHttpRequest object. ▰The following table provides a list of the possible values for the readyState property: ▰
  • 11. 11 THANKS! Any questions? You can find me at @username & user@mail.me