Assignment

Write an Ajax address book like the one shown in Figure 15-11. First, create an XML file that is to be your address book. Each person should have a name, a home address, a phone number, and an email address. When the web page opens, it should get the names of the people in the XML file and then put them into the select field. When a user clicks a name in the select field, Ajax should look up that person in the phone book and display the results in the spans below the select box.

An Ajax-enabled address book

Figure 15-13. An Ajax-enabled address book

Get The Book of JavaScript, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.