AJAX Asynchronous JavaScript and XML - PowerPoint PPT Presentation

1 / 6
About This Presentation
Title:

AJAX Asynchronous JavaScript and XML

Description:

From Previous Example: // to get a reference to the DIV element. var elm=document.getElementById('sample'); //following will alert 3 - TEXT NODE ... – PowerPoint PPT presentation

Number of Views:131
Avg rating:3.0/5.0
Slides: 7
Provided by: a15131
Category:

less

Transcript and Presenter's Notes

Title: AJAX Asynchronous JavaScript and XML


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
  • ltdiv id"sample"gt
  • This is a ltbgtsample of HTMLlt/bgt ltbrgt to
    demonstrate the DOM
  • lt/divgt

5
How to Access DOM
  • From Previous Example
  • // to get a reference to the DIV element
  • var elmdocument.getElementById("sample")
  • //following will alert 3 - TEXT NODE
  • alert(elm.childNodes0.nodeType)
  • // following will //will alert "this is a"
  • alert(elm.childNodes0.nodeValue)

6
How JavaScript Manipulates DOM
  • Hello World Example
Write a Comment
User Comments (0)
About PowerShow.com