Login

CAREER TRAINING



    VB.Net



Asynchronous JavaScript and XML (AJAX) 


Ajax (also known as AJAX), shorthand for "Asynchronous JavaScript and XML," is a web development technique for creating interactive web applications. The intent is to make web pages feel more responsive by exchanging small amounts of data with the server behind the scenes, so that the entire web page does not have to be reloaded each time the user requests a change. This is intended to increase the web page's interactivity, speed, and usability.

SALIENT FEATURES

XHTML (or HTML) and CSS, for marking up and styling information.

The DOM accessed with a client-side scripting language, especially ECMAScript implementations such as JavaScript and JScript, to dynamically display and interact with the information presented.

The XMLHttpRequest object is used to exchange data asynchronously with the web server. In some Ajax frameworks and in certain situations, an IFrame object is used instead of the XMLHttpRequest object to exchange data with the web server, and in other implementations, dynamically added <script> tags may be used.

XML is sometimes used as the format for transferring data between the server and client, although any format will work, including preformatted HTML, plain text, JSON and even EBML. These files may be created dynamically by some form of server-side scripting.

APPLICATION

· standards-based presentation using XHTML and CSS;
· dynamic display and interaction using the Document Object Model;
· data interchange and manipulation using XML and XSLT;
· asynchronous data retrieval using XMLHttpRequest;
· and JavaScript binding everything together.
· and JavaScript binding everything together. 

TOPICS COVERED

Getting to know Ajax

· Downloading Data Behind the Scenes
· Modifying Web Pages on the Fly
· Searching in Real Time with Live Searches
· Getting the Answer With Autocomplete
· Dragging and Dropping HTML Elements With Ajax

Writing Ajax

· Working With JavaScript in Browsers 
· Creating an XMLHttpRequest Object in JavaScript 
· Checking the XMLHttpRequest Object's readyState
· property 
· Checking the XMLHttpRequest Object's status property 
· Getting Your Data With the XMLHttpRequest Object 
· Problems creating an XMLHttpRequest Object 
· Fetching Text Data From the Browser 
· Decoding the Fetched Data   
· Selecting Relative or Absolute URLs 
· Getting XMLHttpRequest Objects in Other Ways 
· Using Server-Side Scripting 
· Storing Ajax Data in XML 
· Passing Data to the Server with GET 
· Passing Data to the Server with POST 

Getting More Ajax Power

· Determining Which Browser the User Has
· Handling Head Requests for More Data
· Creating a Live Search Pt.1
· Creating a Live Search Pt.2
· Connecting to Google Suggest  
· Calling a Different Domain Safely
· Using Two XMLHttpRequest objects
· Handling Multiple XMLHttpRequest Requests
·  Returning JavaScript Objects From the Server

 

Creating Ajax Applications

· Downloading Images Using Ajax
· Creating a Shopping Cart
· Handling Mouse Events
· Enabling Dragging
· Handling Drops
· Communicating With the Shopping Cart on the Server
· Creating an Ajax-driven Drop-down Menu System
·  Downloading Data with Drop-down Menu System
·  Displaying a Menu with a Drop-down Menu System

 

Using XML With Ajax

· Understanding XML
· Loading XML into a Browser Object
· Navigating through XML Documents Using JavaScript
· Extracting data from text nodes
· Handling White Space in Mozilla and Firefox
· Accessing Attribute Values in XML Elements
· Accessing XML Elements by Name
· Validating XML You Get From the Server
· Validating XML With a DTD

Using CSS With Ajax in Web Pages

· Introducing CSS
· Setting Styles
· Using an External Style Sheet
· Working with Text Styles
· Setting Colors and Backgrounds
· Getting Newly-displayed Text Noticed
· Showing Ajax Results
· Hiding Ajax Results
· Positioning Elements
· Positioning Elements: Absolute Positioning
· Positioning Elements: Relative Positioning
· Stacking

Using PHP and Ajax

· Using PHP in Web Pages
· Understanding Basic PHP Syntax
· Working With Variables
· Working With Operators
· Working With Strings
· Working With Arrays
· Making Choices With the if Statement
· Using the switch Statemen
· Using for Loops in PHP
· Using while Loops in PHP  
· Sending Data to the Server
· Extracting Data from Checkboxes
· Extracting Data from Radio Buttons
· Extracting Data from Listboxes
· Uploading Files
· Reading Uploaded Files
· Redirecting the Browser

Doing It Right: Ajax Best Practices

· Handling the Back Button
· Remember - Google Can't See Your Ajax Content
· Watching Out for Browser Caching  
· Giving Visual Cues
· Wrap-up