Prev | Current Page 114 | Next

Larry Ullman

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

In this script, I??™m making
use of the PECL JSON class
(which must be installed; see
http://pecl.php.net??”it??™s
enabled by default as of PHP
5.2).
??? Alternatively, see the o?¬? cial
JSON Web site (www.json.org)
for includable PHP libraries that
can perform the conversion of an
array to JSON.
146 Appendix
JavaScript frameworks p. 140
??? There are three main downsides
to using frameworks. The fi rst is
that they require some effort to
learn how to use them. The second
is that they normally greatly
increase the amount of data
that a user must download from
your site (which is to say, frameworks
are almost inherently
bloated). Finally, you must pay
attention to new releases of a
framework, as they might patch
security holes.
??? In choosing a framework, factor
in how many and what browsers
it supports, how large it is
(in terms of fi le size that the user
will end up downloading), and
how well documentated it is.
Appendix 147
This page intentionally left blank
index
SYMBOLS
$error variable, 68, 71, 72
$errors array, 50, 52
... (ellipses), in code blocks, xii
\n (newline character), 109
+ (plus sign), in JavaScript, 83
values, 13<br>A<br>adding employees, 43??“58<br>HTML pages, creating, 44, 45??“48<br>PHP scripts, creating, 44, 49??“54<br>testing, 54??“56<br>adding employees (using Ajax), 59??“86<br>Ajax, setting up, 64, 82<br>database, updating, 72<br>form data, preparing, 65??“66, 83<br>form data, validating, 68??“71, 84<br>HTML pages, modifying, 62, 82<br>HTML pages, updating, 75??“79, 85<br>JavaScript files, creating, 62??“63, 83<br>overview of, 60??“61<br>PHP scripts, new, 67, 83<br>testing, 80??“81<br>XML, completing, 73??“74<br>Ajax<br>Ajax layer, applying, 63, 103??“104<br>alternatives to, 131<br>basics of, x??“xi<br>checking for support of, 28<br>elements, adding, 62, 102<br>frameworks, listed, 141<br>indexing Ajax pages, 130<br>limitations of, 130, 146<br>setting up, 30, 64, 105<br>testing, and Firefox, 42<br>alerts, JavaScript, 143<br>appendChild( ) function, 127<br>B<br>back buttons, 130<br>bookmarking, 130, 146<br>browsing employees, 11??“24<br>CSS style sheets and, 12, 19??“20, 24<br>databases, connecting to, 12, 18, 23<br>HTML pages, creating, 12, 13??“14, 22<br>PHP scripts, writing, 12, 15??“17,<br>22??“23<br>testing pages, 12, 21, 24<br>browsing employees (using Ajax),<br>25??“42<br>functions, calling, 29??“31, 35??“36,<br>40, 41??“42<br>functions, making, 27??“28, 39<br>HTML pages, modifying, 37<br>PHP scripts, writing, 32??“34, 41<br>testing, 38, 42<br>149<br>index<br>C<br>Castro, Elizabeth, xviii, 22, 24<br>code in this book<br>downloading, xii<br>JSON alternative to XML, 134??“138<br>collation (database), defined, 9<br>columns<br>adding to tables, 9<br>column definitions, 10<br>INSERT query and, 58<br>concatenation, defined, 83<br>createElement( ) function, 127<br>CSS style sheets<br>creating, 12, 19??“20, 24<br>page appearance and, 45, 89<br>using, 20<br>D<br>databases<br>adding records to, 53<br>collation, defined, 9<br>connecting to, 12, 18, 23<br>querying, 108<br>updating, 72<br>databases, creating, 1??“10<br>basics of, 3??“4, 9<br>MySQL, accessing, 2, 9<br>tables, creating, 5??“6, 9<br>tables, populating, 7??“8, 10<br>debugging<br>Ajax applications, 42<br>Firebug and, 145<br>Firefox and, 15, 145<br>JavaScript, 142??“145<br>MySQL client and, 97<br>PHP scripts and, 23, 24<br>PHP-MySQL, 58, 84, 125<br>running mysql client and, 97<br>Venkman JavaScript Debugger, 145<br>XML, 84, 125<br>departments<br>department column, 9<br>department IDs and PHP pages,<br>15, 16<br>department_id value, 10<br>departments table, 9, 10<br>departments variable, 113<br>drop-down list of, 12, 48<br>GET method and, 57, 82<br>in searches, 117??“118<br>select menu of, 14<br>Document Object Model (DOM)<br>inspectors, 144<br>dot syntax, JSON, 138<br>E<br>ellipses (. <br /><br /><br /> <b>Pages:</b><br /> <b><a href="http://www.electronicbook.org.ua/book/70279/Building-a-Web-Site-with-Ajax--Visual-QuickProject-Guide/num_102.html">102</a></b> <b><a href="http://www.electronicbook.org.ua/book/70280/Building-a-Web-Site-with-Ajax--Visual-QuickProject-Guide/num_103.html">103</a></b> <b><a href="http://www.electronicbook.org.ua/book/70281/Building-a-Web-Site-with-Ajax--Visual-QuickProject-Guide/num_104.html">104</a></b> <b><a href="http://www.electronicbook.org.ua/book/70282/Building-a-Web-Site-with-Ajax--Visual-QuickProject-Guide/num_105.html">105</a></b> <b><a href="http://www.electronicbook.org.ua/book/70283/Building-a-Web-Site-with-Ajax--Visual-QuickProject-Guide/num_106.html">106</a></b> <b><a href="http://www.electronicbook.org.ua/book/70284/Building-a-Web-Site-with-Ajax--Visual-QuickProject-Guide/num_107.html">107</a></b> <b><a href="http://www.electronicbook.org.ua/book/70285/Building-a-Web-Site-with-Ajax--Visual-QuickProject-Guide/num_108.html">108</a></b> <b><a href="http://www.electronicbook.org.ua/book/70286/Building-a-Web-Site-with-Ajax--Visual-QuickProject-Guide/num_109.html">109</a></b> <b><a href="http://www.electronicbook.org.ua/book/70287/Building-a-Web-Site-with-Ajax--Visual-QuickProject-Guide/num_110.html">110</a></b> <b><a href="http://www.electronicbook.org.ua/book/70288/Building-a-Web-Site-with-Ajax--Visual-QuickProject-Guide/num_111.html">111</a></b> <b><a href="http://www.electronicbook.org.ua/book/70289/Building-a-Web-Site-with-Ajax--Visual-QuickProject-Guide/num_112.html">112</a></b> <b><a href="http://www.electronicbook.org.ua/book/70290/Building-a-Web-Site-with-Ajax--Visual-QuickProject-Guide/num_113.html">113</a></b> 114 <b><a href="http://www.electronicbook.org.ua/book/70292/Building-a-Web-Site-with-Ajax--Visual-QuickProject-Guide/num_115.html">115</a></b> <b><a href="http://www.electronicbook.org.ua/book/70293/Building-a-Web-Site-with-Ajax--Visual-QuickProject-Guide/num_116.html">116</a></b> <b><a href="http://www.electronicbook.org.ua/book/70294/Building-a-Web-Site-with-Ajax--Visual-QuickProject-Guide/num_117.html">117</a></b> <b><a href="http://www.electronicbook.org.ua/book/70295/Building-a-Web-Site-with-Ajax--Visual-QuickProject-Guide/num_118.html">118</a></b> <b><a href="http://www.electronicbook.org.ua/book/70296/Building-a-Web-Site-with-Ajax--Visual-QuickProject-Guide/num_119.html">119</a></b> <b><a href="http://www.electronicbook.org.ua/book/70297/Building-a-Web-Site-with-Ajax--Visual-QuickProject-Guide/num_120.html">120</a></b> <b><a href="http://www.electronicbook.org.ua/book/70298/Building-a-Web-Site-with-Ajax--Visual-QuickProject-Guide/num_121.html">121</a></b> <b><a href="http://www.electronicbook.org.ua/book/70299/Building-a-Web-Site-with-Ajax--Visual-QuickProject-Guide/num_122.html">122</a></b> <b><a href="http://www.electronicbook.org.ua/book/70300/Building-a-Web-Site-with-Ajax--Visual-QuickProject-Guide/num_123.html">123</a></b> <b><a href="http://www.electronicbook.org.ua/book/70301/Building-a-Web-Site-with-Ajax--Visual-QuickProject-Guide/num_124.html">124</a></b> <b><a href="http://www.electronicbook.org.ua/book/70302/Building-a-Web-Site-with-Ajax--Visual-QuickProject-Guide/num_125.html">125</a></b> <b><a href="http://www.electronicbook.org.ua/book/70303/Building-a-Web-Site-with-Ajax--Visual-QuickProject-Guide/num_126.html">126</a></b> </div> </div> </div> </div> </div> <div class="b3"> <div class="brdr"> <div class="cntr"> <a href="http://www.book-e.org.ua/book/191203/The-Adventures-of-Jerry-Muskrat/num_15.html">The Adventures of Jerry Muskrat (page 15)</a> <a href="http://www.yourbook.org.ua/book/66477/Xen-Virtualization--A-Practical-Handbook/num_34.html">Xen Virtualization: A Practical Handbook (page 34)</a> <a href="http://www.book-e.org.ua/book/630606/First-Book-of-Adam-and-Eve/num_4.html">First Book of Adam and Eve (page 4)</a> </div> </div> </div> </div> <div class="right_cont"> <!-- <div class="b3"> <div class="brdr"> <div class="cntr"> Best deals of <a href="http://www.triptake.com/Hotels-in-Amsterdam-43076/">Amsterdam Holland hotels</a> <br> Read <a href="http://www.triptake.com/Hotels-in-Los-Angeles-44136/">Los Angeles hotels travel reviews</a><br> <a href="http://www.triptake.com/">Compare hotel deals</a> by reviews and photos of the hotels<br><br> Actual <a href="http://www.businessdump.org.ua/">Business Articles</a><br> <br> <a href="http://www.deborahwilding.com/">Wild digital books</a> <a href="http://www.thethingswedo.net/">The things we do!</a> <a href="http://www.innocencedenied.com/">Innocent books</a> </div> </div> </div> --> </div> </div> </body> </html>