SlideShare ist ein Scribd-Unternehmen logo
1 von 23
AJAX –  Asynchronous JavaScript and XML Vijay Khambalkar Magnet Technologies Pvt. Ltd.
What is AJAX ? Ajax is just a style of design, one that makes feel less web and more desktop
Why AJAX ? ,[object Object],[object Object],[object Object]
AJAX Characteristics : ,[object Object],[object Object],[object Object]
Ajax Lifecycle
How to use AJAX practically ? ,[object Object],[object Object]
XmlHttpRequest ? ,[object Object],[object Object],[object Object],[object Object]
XmlHttpRequest Component ,[object Object],[object Object],[object Object],[object Object],[object Object]
Let’s see some coding : var req; function retrieveURL(url) {      if (window.XMLHttpRequest) // Non-IE browsers {        req = new XMLHttpRequest();      }  else if (window.ActiveXObject) // IE {        req = new ActiveXObject("Microsoft.XMLHTTP");      }       req.open("GET", url, true);       req.onreadystatechange = processStateChange;       req.send(null);    }
Let’s see some coding : function processStateChange() {      if (req.readyState == 4) // Complete {        if (req.status == 200) // OK response {          document.getElementById(“MyContent").innerHTML = req.responseText;        }       }    }  
Who created AJAX ? ,[object Object],[object Object],[object Object]
AJAX with PHP
Coding : PHP [server.php] ,[object Object],[object Object],[object Object],[object Object]
Coding: Javascript [client.htm] ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Coding: Javascript [client.htm] ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Coding: Javascript [client.htm] ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
AJAX Libraries in PHP ,[object Object],[object Object],[object Object],[object Object]
Lets Try Out Example
When to go the AJAX way ? “  Not Always !!! Abuse of any technology would make it a liability !!! ”
Where has AJAX been used ? ,[object Object],[object Object],[object Object],[object Object],[object Object]
Limitations of AJAX ,[object Object],[object Object],[object Object]
Summary
Thank You

Weitere ähnliche Inhalte

Was ist angesagt?

Ajax Presentation
Ajax PresentationAjax Presentation
Ajax Presentationjrdoane
 
Introduction to ajax
Introduction  to  ajaxIntroduction  to  ajax
Introduction to ajaxPihu Goel
 
Developing great applications using ASP.NET MVC and ASP.NET AJAX
Developing great applications using ASP.NET MVC and ASP.NET AJAXDeveloping great applications using ASP.NET MVC and ASP.NET AJAX
Developing great applications using ASP.NET MVC and ASP.NET AJAXTatham Oddie
 
Advantages and disadvantages of an ajax based client application
Advantages and disadvantages of an ajax based client applicationAdvantages and disadvantages of an ajax based client application
Advantages and disadvantages of an ajax based client applicationPlacinta Alin
 
Extending Ajax Events for all mankind
Extending Ajax Events for all mankindExtending Ajax Events for all mankind
Extending Ajax Events for all mankindKyle Simpson
 
Beyond HTML: Tools for Building Web 2.0 Apps
Beyond HTML: Tools for Building Web 2.0 AppsBeyond HTML: Tools for Building Web 2.0 Apps
Beyond HTML: Tools for Building Web 2.0 AppsMarcos Caceres
 
Marketing Automation with dotCMS
Marketing Automation with dotCMSMarketing Automation with dotCMS
Marketing Automation with dotCMSJason Smith
 
Overview of AJAX
Overview of AJAXOverview of AJAX
Overview of AJAXRoshith S Pai
 
Ajax Presentation for the TSSG
Ajax Presentation for the TSSGAjax Presentation for the TSSG
Ajax Presentation for the TSSGPaulMWatson
 
Introduction about-ajax-framework
Introduction about-ajax-frameworkIntroduction about-ajax-framework
Introduction about-ajax-frameworkSakthi Bro
 
Ajax assignment help
Ajax assignment helpAjax assignment help
Ajax assignment helpjohn mayer
 

Was ist angesagt? (20)

Ajax Presentation
Ajax PresentationAjax Presentation
Ajax Presentation
 
Ajax Ppt 1
Ajax Ppt 1Ajax Ppt 1
Ajax Ppt 1
 
Ajax.ppt
Ajax.pptAjax.ppt
Ajax.ppt
 
Ajax and RJS
Ajax and RJSAjax and RJS
Ajax and RJS
 
Introduction to ajax
Introduction  to  ajaxIntroduction  to  ajax
Introduction to ajax
 
Developing great applications using ASP.NET MVC and ASP.NET AJAX
Developing great applications using ASP.NET MVC and ASP.NET AJAXDeveloping great applications using ASP.NET MVC and ASP.NET AJAX
Developing great applications using ASP.NET MVC and ASP.NET AJAX
 
Ajax
AjaxAjax
Ajax
 
Ajax
AjaxAjax
Ajax
 
Ajax
AjaxAjax
Ajax
 
Advantages and disadvantages of an ajax based client application
Advantages and disadvantages of an ajax based client applicationAdvantages and disadvantages of an ajax based client application
Advantages and disadvantages of an ajax based client application
 
Extending Ajax Events for all mankind
Extending Ajax Events for all mankindExtending Ajax Events for all mankind
Extending Ajax Events for all mankind
 
Beyond HTML: Tools for Building Web 2.0 Apps
Beyond HTML: Tools for Building Web 2.0 AppsBeyond HTML: Tools for Building Web 2.0 Apps
Beyond HTML: Tools for Building Web 2.0 Apps
 
Marketing Automation with dotCMS
Marketing Automation with dotCMSMarketing Automation with dotCMS
Marketing Automation with dotCMS
 
Ajax3
Ajax3Ajax3
Ajax3
 
Overview of AJAX
Overview of AJAXOverview of AJAX
Overview of AJAX
 
AJAX
AJAXAJAX
AJAX
 
Ajax
AjaxAjax
Ajax
 
Ajax Presentation for the TSSG
Ajax Presentation for the TSSGAjax Presentation for the TSSG
Ajax Presentation for the TSSG
 
Introduction about-ajax-framework
Introduction about-ajax-frameworkIntroduction about-ajax-framework
Introduction about-ajax-framework
 
Ajax assignment help
Ajax assignment helpAjax assignment help
Ajax assignment help
 

Andere mochten auch

THECONTENT|FACTORY overview
THECONTENT|FACTORY overviewTHECONTENT|FACTORY overview
THECONTENT|FACTORY overviewLayth Dajani
 
WSI4Success Website examples
WSI4Success Website examplesWSI4Success Website examples
WSI4Success Website examplesPeter Bushaway
 
Revelion 2010 Praga
Revelion 2010 PragaRevelion 2010 Praga
Revelion 2010 Pragaexploretravel
 
Navigating Identities
Navigating IdentitiesNavigating Identities
Navigating Identitiesmr246
 
2013automatedelection
2013automatedelection2013automatedelection
2013automatedelectionGtechmyk wozniak
 
Revelion 2010 Londra
Revelion 2010 LondraRevelion 2010 Londra
Revelion 2010 Londraexploretravel
 
IADR 2010
IADR 2010IADR 2010
IADR 2010miletic
 
My world peace diet recipes
My world peace diet recipesMy world peace diet recipes
My world peace diet recipesGerry Yokota
 
De guerrilla van intranet- en webmanagement
De guerrilla van intranet- en webmanagementDe guerrilla van intranet- en webmanagement
De guerrilla van intranet- en webmanagementChristiaan Lustig
 
5 dingen die klanten echt van je willen
5 dingen die klanten echt van je willen5 dingen die klanten echt van je willen
5 dingen die klanten echt van je willenChristiaan Lustig
 
Top user tasks in 'static' and 'mobile' contexts
Top user tasks in 'static' and 'mobile' contexts Top user tasks in 'static' and 'mobile' contexts
Top user tasks in 'static' and 'mobile' contexts Christiaan Lustig
 
Content inventariseren en beoordelen
Content inventariseren en beoordelenContent inventariseren en beoordelen
Content inventariseren en beoordelenChristiaan Lustig
 
De guerrilla van klantgericht werken - KCC Congres 2015
De guerrilla van klantgericht werken - KCC Congres 2015De guerrilla van klantgericht werken - KCC Congres 2015
De guerrilla van klantgericht werken - KCC Congres 2015Christiaan Lustig
 
Triade, First Ship With Ofoil Propulsion
Triade, First Ship With Ofoil PropulsionTriade, First Ship With Ofoil Propulsion
Triade, First Ship With Ofoil PropulsionBas Goris
 
Toptaken en de klantgerichte website nee organisatie
Toptaken en de klantgerichte website nee organisatieToptaken en de klantgerichte website nee organisatie
Toptaken en de klantgerichte website nee organisatieChristiaan Lustig
 
TPS Characteristics
TPS CharacteristicsTPS Characteristics
TPS Characteristicsbmasawan
 

Andere mochten auch (18)

THECONTENT|FACTORY overview
THECONTENT|FACTORY overviewTHECONTENT|FACTORY overview
THECONTENT|FACTORY overview
 
WSI4Success Website examples
WSI4Success Website examplesWSI4Success Website examples
WSI4Success Website examples
 
Revelion 2010 Praga
Revelion 2010 PragaRevelion 2010 Praga
Revelion 2010 Praga
 
La Propuesta
La PropuestaLa Propuesta
La Propuesta
 
Solidwaste
SolidwasteSolidwaste
Solidwaste
 
Navigating Identities
Navigating IdentitiesNavigating Identities
Navigating Identities
 
2013automatedelection
2013automatedelection2013automatedelection
2013automatedelection
 
Revelion 2010 Londra
Revelion 2010 LondraRevelion 2010 Londra
Revelion 2010 Londra
 
IADR 2010
IADR 2010IADR 2010
IADR 2010
 
My world peace diet recipes
My world peace diet recipesMy world peace diet recipes
My world peace diet recipes
 
De guerrilla van intranet- en webmanagement
De guerrilla van intranet- en webmanagementDe guerrilla van intranet- en webmanagement
De guerrilla van intranet- en webmanagement
 
5 dingen die klanten echt van je willen
5 dingen die klanten echt van je willen5 dingen die klanten echt van je willen
5 dingen die klanten echt van je willen
 
Top user tasks in 'static' and 'mobile' contexts
Top user tasks in 'static' and 'mobile' contexts Top user tasks in 'static' and 'mobile' contexts
Top user tasks in 'static' and 'mobile' contexts
 
Content inventariseren en beoordelen
Content inventariseren en beoordelenContent inventariseren en beoordelen
Content inventariseren en beoordelen
 
De guerrilla van klantgericht werken - KCC Congres 2015
De guerrilla van klantgericht werken - KCC Congres 2015De guerrilla van klantgericht werken - KCC Congres 2015
De guerrilla van klantgericht werken - KCC Congres 2015
 
Triade, First Ship With Ofoil Propulsion
Triade, First Ship With Ofoil PropulsionTriade, First Ship With Ofoil Propulsion
Triade, First Ship With Ofoil Propulsion
 
Toptaken en de klantgerichte website nee organisatie
Toptaken en de klantgerichte website nee organisatieToptaken en de klantgerichte website nee organisatie
Toptaken en de klantgerichte website nee organisatie
 
TPS Characteristics
TPS CharacteristicsTPS Characteristics
TPS Characteristics
 

Ă„hnlich wie mukesh

Ă„hnlich wie mukesh (20)

Ajax
AjaxAjax
Ajax
 
Ajax: User Experience
Ajax: User ExperienceAjax: User Experience
Ajax: User Experience
 
Building Applications Using Ajax
Building Applications Using AjaxBuilding Applications Using Ajax
Building Applications Using Ajax
 
Ajax
AjaxAjax
Ajax
 
Pracitcal AJAX
Pracitcal AJAXPracitcal AJAX
Pracitcal AJAX
 
SynapseIndia dotnet development ajax client library
SynapseIndia dotnet development ajax client librarySynapseIndia dotnet development ajax client library
SynapseIndia dotnet development ajax client library
 
What is Ajax technology?
What is Ajax technology?What is Ajax technology?
What is Ajax technology?
 
M Ramya
M RamyaM Ramya
M Ramya
 
Ajax
AjaxAjax
Ajax
 
Ajax Introduction
Ajax IntroductionAjax Introduction
Ajax Introduction
 
Ajax
AjaxAjax
Ajax
 
Ajax
AjaxAjax
Ajax
 
Asynchronous JavaScript & XML (AJAX)
Asynchronous JavaScript & XML (AJAX)Asynchronous JavaScript & XML (AJAX)
Asynchronous JavaScript & XML (AJAX)
 
AJAX
AJAXAJAX
AJAX
 
Ajax presentation
Ajax presentationAjax presentation
Ajax presentation
 
Ajax
AjaxAjax
Ajax
 
Ajax
AjaxAjax
Ajax
 
Ajax
AjaxAjax
Ajax
 
01 Ajax Intro
01 Ajax Intro01 Ajax Intro
01 Ajax Intro
 
Using Ajax In Domino Web Applications
Using Ajax In Domino Web ApplicationsUsing Ajax In Domino Web Applications
Using Ajax In Domino Web Applications
 

KĂĽrzlich hochgeladen

SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 

KĂĽrzlich hochgeladen (20)

SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 

mukesh

  • 1. AJAX – Asynchronous JavaScript and XML Vijay Khambalkar Magnet Technologies Pvt. Ltd.
  • 2. What is AJAX ? Ajax is just a style of design, one that makes feel less web and more desktop
  • 3.
  • 4.
  • 6.
  • 7.
  • 8.
  • 9. Let’s see some coding : var req; function retrieveURL(url) {     if (window.XMLHttpRequest) // Non-IE browsers {       req = new XMLHttpRequest();     } else if (window.ActiveXObject) // IE {       req = new ActiveXObject("Microsoft.XMLHTTP");     }      req.open("GET", url, true);      req.onreadystatechange = processStateChange;      req.send(null);   }
  • 10. Let’s see some coding : function processStateChange() {     if (req.readyState == 4) // Complete {       if (req.status == 200) // OK response {         document.getElementById(“MyContent").innerHTML = req.responseText;       }     }   }  
  • 11.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18. Lets Try Out Example
  • 19. When to go the AJAX way ? “ Not Always !!! Abuse of any technology would make it a liability !!! ”
  • 20.
  • 21.

Hinweis der Redaktion

  1. AJAX – has taken IT industry by storm. It might turn out to be one of the most demanded thing/in thing and hence, a brief presentation to understand AJAX. Be it anything that we are learning, asking 6 key questions is very important to get an overall idea of the same. The questions being – What, Why, Who, How, When and Where. So let’s being with what is AJAX? – not a technology, not a product … but an approach taken to develop Web Applications.
  2. Inorder to understand what is this approach all about … let us first seek to know what the current approach is … At present, for every user interaction, the entire web page is rebuild. Even if a part of the entire page needs to be changed … we land up reloading the entire page. Which leads to … network traffic … slow speed … and most importantly … user experience goes down … user has to wait for loading of images … controls … which had already been loaded once!!! This is what AJAX asks us not to do.
  3. Continuous Feel: Traditional web applications force you to submit a form, wait a few seconds, watch the page redraw, and then add some more info. Forgot to enter the area code in a phone number? Start all over again. Sometimes, you feel like you're in the middle of a traffic jam: go 20 metres, stop a minute, go 20 metres, stop a minute ... How many E-Commerce sales have been lost because the user encountered one too many error message and gave up the battle? Ajax offers a smooth ride all the way. There's no page reloads here - you're just doing stuff and the browser is responding. Real-Time Updates: As part of the continous feel, Ajax applications can update the page in real-time. Currently, news services on the web redraw the entire page at intervals, e.g. once every 15 minutes. In contrast, it's feasible for a browser running an Ajax applciation to poll the server every few seconds, so it's capable of updating any information directly on the parts of the page that need changing. The rest of the page is unaffected. Graphical Interaction: Flashy backdrops are abundant on the web, but the basic mode of interaction has nevertheless mimicked the 1970s-style form-based data entry systems. Ajax represents a transition into the world of GUI controls visible on present-day desktops. Thus, you will encounter animations such as fading text to tell you something's just been saved, you will be able to drag items around, you will see some static text suddenly turn into an edit field as you hover over it.