Prev | Current Page 99 | Next

Larry Ullman

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


??? By passing the form data in
the URL, we ensure that the
Ajax request will be made
to search_results_xml.
php?last_name=XXX, where
XXX represents what the user
typed in the text box.
apply the Ajax
layer p. 103
??? Most of this code is exactly
like that in dept.js and add_
employee.js. The big di?¬? erence
at fi rst is the name of the
form being referenced. It??™s in
the rest of the code??”what
should be done when the form
is submitted??”that the big differences
can be found.
124 enabling an Ajax search
prepare for XML p. 107
??? The PHP script sends its
response as XML data, not as a
normal Web page. Everything
PHP will print will be part of
this XML and there will be no
HTML output.
??? The XML data being created
is really like the data in an
HTML page, where there??™s one
root element and any number
of nested subelements. For
this example, the root element
will be called employees and
there will be zero or more subelements
called employee.
??? If the PHP page does not use
the header() function to
set the Content-Type, the
JavaScript that receives this
response will not recognize it
as XML.


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