+ All Categories
Home > Documents > Ajax Highlights

Ajax Highlights

Date post: 24-Jun-2015
Category:
Upload: sharvan-kumar
View: 311 times
Download: 0 times
Share this document with a friend
Description:
A very good presentation to brief about Ajax
Popular Tags:
13
Ajax Highlights Sharvan Kumar 08 October 2009
Transcript
Page 1: Ajax Highlights

Ajax Highlights

Sharvan Kumar

08 October 2009

Page 2: Ajax Highlights

How Ajax Works

Asynchronous applications make requests using a JavaScript object, and not a form submit.

Your requests and responses are handled by the web browser, not directly by your JavaScript code.

Once the web browser gets a response to your asynchronous request, it will "call back" your JavaScript with the server's response.

Page 3: Ajax Highlights

Create Request

Page 4: Ajax Highlights

What Server Used to do??

Initialize the connection.Create Ajax Request

GET Request . POST for post request

True Means Asynchronous Request,False Means Synchronous Request.

URL of the page whereRequest is to be sent.

Initialize Connection

Page 5: Ajax Highlights

Let’s break down that a bit

Page 6: Ajax Highlights

Mr. Code……..and Mrs. Comment

Page 7: Ajax Highlights

Connecting to Web Server

Send Null Request To Server

Page 8: Ajax Highlights

Sending Instructions to Web Browser

The browser checks the request object to see what it should do next... updatePage() ...and finds out it should run the updatePage() JavaScript function.

Page 9: Ajax Highlights

Get back Server Response

Data returned from Server accessed With responseTextProperty…

Page 10: Ajax Highlights

Checking Right Ready State

The readyState code changes value from 0 to 4 during a request cycle:

0: not initialized. 1: connection established. 2: request received. 3: processing. 4: finished and response is ready.

Page 11: Ajax Highlights

Let’s See what actually happens

Page 12: Ajax Highlights

Summery

Page 13: Ajax Highlights

Recommended