Professional Documents
Culture Documents
Introduc
Thanks
Speaker
Topics
Index
e
E
Discussion On AJAX
WELCOM
AJAX AJAX AJAX
1 2 3
W.System
Structur
Introducin
Speaker
Topics
Index
Introducing Working Structure
e
g
System
AJAX AJAX AJAX
4 5 6
W.System
Structur
Introducin
Speaker
Topics
Index
Properties Important Question Part
e
g
Discussion
Introducing AJAX
Introducin
Speaker
Topics
Its not a New Programming Language but new way to use existing.
Index
e
g
Ajax is a art of Exchanging Data with Server.
W.System
Introducin
g
Index
Topics
Speaker
Page 01
Page 02
Page 03
Properties of
Page 04
AJAX Page 05
Page 06
Page 07
The keystone of AJAX is the
XMLHttpRequest object.
Creating AJAX
The XMLHttpRequest Object
All modern browsers support the
XMLHttpRequest object (IE5 and IE6 use an Send Req to the
ActiveXObject). Server
The XMLHttpRequest object is used to
exchange data with a server behind the
scenes. This means that it is possible to
update parts of a web page, without Get or Post
reloading the whole page.
Important properties
Page 05
Page 06
Page 07
Method Description
Important properties
send(string) Sends the request off to the server.
string: Only used for POST requests
Page 05
xmlhttp.open("GET","ajax_info.txt",true);
xmlhttp.send(); Page 07
Method Description
open Specifies the type of request, the
(method,u URL, and if the request should be GET is simpler and faster than
rl,async) handled asynchronously or not.
Page 01
method: the type of request: GET
POST, and can be used in most
or POST cases.
url: the location of the file on the
server However, always use POST
Send req to Server
async: true (asynchronous) or false requests when:
(synchronous)
A cached file is not an
option (update a file or Get or Post
database on the server)
Sending a large amount
of data to the server Important properties
send(strin Sends the request off to the server.
g) string: Only used for POST (POST has no size
requests limitations) Page 05
Sending user input
(which can contain
To send a request to a server, we use the open() and unknown characters), Page 06
send() methods of the XMLHttpRequest object:
Example POST is more robust and
xmlhttp.open("GET","ajax_info.txt",true); secure than GET
xmlhttp.send(); Page 07
Three important properties of the XMLHttpRequest
Property Description
Page 01 GET is simpler and faster than onreadystat Stores a function (or the name
Important Properties
echange of a function) to be called
POST, and can be used in most automatically each time the
cases. readyState property changes
Get or Post
However, always use POST
requests when:
A cached file is not an
readyState Holds the status of the
option (update a file or XMLHttpRequest. Changes
from 0 to 4:
database on the server) 0: request not initialized
Sending a large amount 1: server connection
established
Page 04
of data to the server 2: request received
3: processing request
(POST has no size 4: request finished and
response is ready Page 05
limitations)
Sending user input
(which can contain Page 06
unknown characters),
POST is more robust and
secure than GET Status 200: "OK"
Page 07
404: Page not found
Three important properties of the XMLHttpRequest
Property Description
Important Properties
echange of a function) to be called
automatically each time the
readyState property changes
Page 06
Properties
coded properly it will run
W.System
Discussio
Structur
Introducin
integration of
Speaker
faster than and as secure as a
Advantage
Topics
browsers non-Ajax program.
Index
Ajax also allows websites to
Page can be refreshed • hard for the user to reduce their overall
02
dynamically bookmark the state bandwidth usage and server
n
of the web page load by reducing the amount
e
g
• Response of the interface to of full page loads.
user is faster
01
payload is much smaller
Questions
Properties
Structur
W.System
e
Introducin
g
Index
Topics
Speaker
Thanks for Patience.
Thanks
Properties
Structur
W.System
e
Introducin
g
Index
Topics
Speaker