Prev | Current Page 102 | Next

Larry Ullman

"Building a Web Site with Ajax: Visual QuickProject Guide"

A status code of 304
indicates that the page was
found but had not been modi-
fi ed since a certain date and
time.
extra bits (cont.)
126 enabling an Ajax search
display the
results p. 114
??? This example, which uses both
nodes in the DOM and XML
data from PHP, is the most
complicated in the book. The
idea is simple, though: take
the HTML code generated by
the non-Ajax PHP script and
duplicate it using Ajax. So
everything in the last half of
this chapter is just a matter
of using nodes, the DOM, and
XML to that end.
??? So many JavaScript variables
are declared because creating
nodes in the DOM is a multistep
process, as you??™ll see in
this chapter. And since each
employee??™s record has multiple
elements??”one paragraph,
one span, two breaks, one a
link, one strong, plus three
pieces of text (the name, the
department, and the email
address)??”it??™ll be easiest to
follow using many di?¬? erent
variables.
??? The syntax of the for loop
is a common way to access
every item found in an array.
Within the loop, the specifi c
array item is accessed via
arrayname[i].
??? The createElement() function
is the most important for adding
nodes to the DOM.


Pages:
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114