ajax

27

Category:

Technology


2 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Ajax
Page 2: Ajax

Disclaimer: This presentation is prepared by trainees of baabtra as a part of mentoring program. This is not official document of baabtra –Mentoring PartnerBaabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt . Ltd

Page 3: Ajax

Week Target Achieved

1 30 22

2 30 23

3 30 25

4 30 26

Typing Speed

Page 4: Ajax

Jobs AppliedWeek Company Designation Applied Date Current Status

1

2

3

Page 5: Ajax

Ajax

Muhammed Ajmal [email protected]/ajuik2008twitter.com/usernamein.linkedin.com/in/

profilename9745020951

Page 6: Ajax

Overview

• Introduction• Ajax technologies• XMLHttpRequest• How Ajax work?• Ajax example

Page 7: Ajax

Introduction

• It is an acronym for Asynchronous

Javascript

And

XML.

• It is a group of inter-related technologies• AJAX allows you to send and receive data

asynchronously without reloading the web page.

Page 8: Ajax

Web page without Ajax

Page 9: Ajax

Web page with Ajax

Page 10: Ajax

Where it is used?

• Google Map• Facebook• Twitter•  you tube

Page 11: Ajax

AJAX Technologies

• HTML/CSS• DOM• XML or JSON• XMLHttpRequest• Javascript

Page 12: Ajax

XMLHttpRequest

• The keystone of AJAX is the XMLHttpRequest object.

• The XMLHttpRequest object is used to exchange data with a server behind the scenes. 

Page 13: Ajax

Properties of XMLHttpRequest object

Page 14: Ajax

Methods of XMLHttpRequest object

Page 15: Ajax

Status Property Value

200 = ok

201 = created

204 = no content

404 = not found

Page 16: Ajax

Create XMLHttpRequest object

var xmlhttp;if (window.XMLHttpRequest)  {

// code for IE7+, Firefox, Chrome, Opera, Safari  xmlhttp=new XMLHttpRequest();  }else  {

// code for IE6, IE5  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");  }

Page 17: Ajax

Create Request

• Step 1: Creating a XML HTTP Request object – var xmlhttp = new XMLHttpRequest();

• Step 2: Specifying where and how to retrieve the resource – xmlhttp.open('GET', 'foo.jsp', true);

• Step 3: Setting a function to be called when the response is returned by the server – xmlhttp.onreadystatechange = function()

{ // Code to handle the response here }

Page 18: Ajax

Create Request contd..

• Step 4: Send the request– xmlhttp.send(null);

Page 19: Ajax

Simple Example

Page 20: Ajax

How AJAX works

Page 21: Ajax

Example Check username

Page 22: Ajax

Example contd..

Page 23: Ajax

Example contd..

Page 24: Ajax

Example contd..

Page 25: Ajax

Example contd..

Page 26: Ajax

If this presentation helped you, please visit our page facebook.com/baabtra and like it.

Thanks in advance.

www.baabtra.com | www.massbaab.com |www.baabte.com

Page 27: Ajax

Contact Us

Emarald Mall (Big Bazar Building)Mavoor Road, Kozhikode,Kerala, India.Ph: + 91 – 495 40 25 550

NC Complex, Near Bus StandMukkam, Kozhikode,Kerala, India.Ph: + 91 – 495 40 25 550

Start up VillageEranakulam,Kerala, India.

Email: [email protected]

NIT-TBI,NIT Campus, Kozhikode,Kerala, India.