Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 17 Ajax with XML. Cary Grant Myrna Loy James Stewart.

Similar presentations


Presentation on theme: "Lecture 17 Ajax with XML. Cary Grant Myrna Loy James Stewart."— Presentation transcript:

1 Lecture 17 Ajax with XML

2 Cary Grant Myrna Loy James Stewart

3 Snow Day 63 No school today! 2/2/2009 Ralph Kramden Alice Kramden Ed Norton

4 DTD <!DOCTYPE parties [ <!ATTLIST party type CDATA #IMPLIED> <!ATTLIST person attendance CDATA #IMPLIED> ]>

5

6

7 Creating new XMLHTTP object

8

9

10

11 Getting the name of 2nd person function displayGuest (xmldoc) { var partiesNode, partyNode, peopleNode; var firstNameNode, lastNameNode, displayText; partiesNode = xmldoc.documentElement; partyNode = partiesNode.firstChild; peopleNode = partyNode.lastChild; personNode = peopleNode.lastChild; personNode = personNode.previousSibling; firstNameNode = personNode.firstChild; lastNameNode = firstNameNode.nextSibling; displayText = "The second guest was " + firstNameNode.firstChild.nodeValue + ' ' + lastNameNode.firstChild.nodeValue; var target = document.getElementById("targetDiv"); target.innerHTML=displayText; }


Download ppt "Lecture 17 Ajax with XML. Cary Grant Myrna Loy James Stewart."

Similar presentations


Ads by Google