Prev | Current Page 74 | Next

Larry Ullman

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


??? 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.
??? You don??™t have to fully understand
XML to do this example
or to use XML in general. But
should you want to better understand
the subject, search the
Web for more information.
84 adding records via Ajax
handle the response p. 75
??? In the init() function, we tell
the JavaScript to call a function
called handleResponse()
whenever the readyState value
changes. This value will change
multiple times during an Ajax
request, so this function will be
called multiple times.
??? The XMLHttpRequest status
attribute stores the HTTP status
code returned by the server-side
page. There are dozens of status
codes??”from 200, meaning that
everything was OK, to values
over 500, which are normally
server errors. A status code of
304 indicates that the page was
found but had not been modifi ed
since a certain date and time.
prepare the page p. 76
??? One of the new tricks in this
chapter??™s example is that the
form elements??™ labels will be
changed to indicate errors.


Pages:
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86