Introduction to PEAR
As you might imagine, there are plenty of open source libraries available to the PHP language. In fact, one might say that PHP's success as a language is due to the multitude of available resources and the amazing, helpful online community. Because of the large amount of open source development libraries, implementing clean, effective code into your Ajax-based applications is a mere Google search away. However, like anything, some code libraries repositories are better than others. One of the...
Confirming Important Actions Using a One-Time Token
If a user tries to do something that has some importance such as transferring funds, changing password, or buying goods , make them confirm their intentions before processing the transaction. In the preceding example, the Insecure Bank Co. shouldn't have transferred the money to Bob's account so easily. Julie should have been forced to fill out a specific form for the transaction to take place. In this form, you use a one-time token. This is essentially a password that is generated for a...
Form Validation 2
Form validation well, validation period is what I believe separates the slackers from the true development professionals. Your application will only run as well as the code that implements it, and such success is partly defined by being aware of what errors could potentially occur as well as how to deal with them should problems arise. In the development world, handling errors and unplanned actions is called validation. There are two ways to validate input client-side and server-side....
Tool Tips
One of the more common DHTML tricks you will see on the Internet is the tool tip. This is basically a little box filled with information that will appear above a properly placed cursor. While this is all fine and dandy, the information contained within said box in non-Ajax enabled web sites is usually either hard-coded in or potentially loaded through some server-side trickery. What you will do in the next example is load the box dynamically using Ajax. As a useful addition to your calendar...
Passing Values
When passing values in a regular form, you can simply create a submit or image element that will automatically pass all values of a form to the script designated by the action attribute of a form tag. When the submit element of choice is used, all values are simply bundled up and contained, and then passed to said script with little to no interaction necessary on the part of the developer. Submitting a form via Ajax and then passing the values to a selected script is a touch more complicated,...