Prev | Current Page 70 | Next

Larry Ullman

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


3 The HTML page should show
the results without reloading the
page or going to a new page.
80 adding records via Ajax
4 Fill out the form completely and click Add.
5 Again, the HTML page shows the results.
adding records via Ajax 81
extra bits
add the Ajax elements p. 62
??? The ajax.js fi le, written in Chapter
3, ???browsing using Ajax,???
defi nes a function that returns a
browser-specific XMLHttpRequest
object. This fi le is needed
by any page that performs any
Ajax operations.
??? Because the DIV, where the
results will be reported, has an
id value of results, it will be
formatted according to the rules
dictated in style.css. This is
the same as the results DIV in
dept_form.html. For starters, the
DIV will be hidden when the page
is fi rst viewed.
apply the Ajax layer p. 63
??? Most of this code is exactly like
that in dept.js. You??™ll fi nd that
to be the case with a good Ajax
base, like the one we??™ve developed
in this book. The only
change in this fi rst bit of code is
the reference to emp_form. It??™s
in the rest of the code??”what
should be done when the form is
submitted??”that the big di?¬? erences
can be found.


Pages:
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82