July 2011
Intermediate to advanced
276 pages
5h 11m
English
Included with the book are two versions of the calculator processor, the server-side script that processes the Ajax requests and provides responses. All server-side scripts used in recipes in this book have both a PHP and ColdFusion version. The recipe below, as all do, shows the PHP script installed in the URL of the Ajax call; one must only switch the file ending to .cfm to use the ColdFusion version. The two scripts process identically.
There are five main code blocks in the JavaScript; we will stop before each code block to review in detail.
<script type="text/javascript" src="mootools-1.3.0.js"></script> </head> <body> <div id="main"> <h1>Mortgage ratio calculator</h1> <form action="javascript:" ...