Presentation is loading. Please wait.

Presentation is loading. Please wait.

AJAX (Asynchronous JavaScript and XML) Amit Jain CS 590 – Winter 2008.

Similar presentations


Presentation on theme: "AJAX (Asynchronous JavaScript and XML) Amit Jain CS 590 – Winter 2008."— Presentation transcript:

1 AJAX (Asynchronous JavaScript and XML) Amit Jain CS 590 – Winter 2008

2 AJAX Introduction (Asynchronous JavaScript and XML) Basic Principle Lets you manipulate the contents of a Web page without having to reload the page. How? By manipulating the web browser's DOM

3 DOM - Document Object Model Model for representing an HTML document Manipulation to the HTML DOM objects causes immediate changes

4 Example for DOM This is a sample of HTML to demonstrate the DOM

5 How to Access DOM From Previous Example: // to get a reference to the DIV element var elm=document.getElementById("sample"); //following will alert 3 - TEXT NODE alert(elm.childNodes[0].nodeType); // following will //will alert "this is a" alert(elm.childNodes[0].nodeValue);

6 How JavaScript Manipulates DOM Hello World Example


Download ppt "AJAX (Asynchronous JavaScript and XML) Amit Jain CS 590 – Winter 2008."

Similar presentations


Ads by Google