Form Validation with Progressive Enhancement: Final Touches
(Page 1 of 4 )
In this sixth part of a series, I finish building a sample web application tasked with validating web forms via Ajax and PHP. The use of Progressive Enhancement is crucial to keeping the application working as expected, even if JavaScript is disabled on the browser.
While at first glance the process may look challenging and even intimidating, the truth is that using Progressive Enhancement (PE) to increase the accessibility of some common real-world web applications, such as dynamic image galleries, drop-down menus and form validators is much easier than you might think. Of course, the best way to prove this is by example. With that requirement in mind, in earlier chapters of this series I went through the development of some extensible web programs which relied on the functionality provided by PE to work properly, even if JavaScript was disabled on the browser.
I left off the last tutorial explaining how to create a web application whose main goal was to validate, on the server side, data entered in a web form. It used a combination of the Ajax capabilities offered by jQuery and PHP. In accordance with the model imposed by PE, this application was capable of maintaining its core functionality intact, even if scripting was turned off on the client.
It’s fair to clarify, however, that in its current state the aforementioned application isn’t completely functional. It needs the PHP script responsible for performing the actual validation process on the inputted data, which we haven't written yet. Therefore, over the course of this sixth installment of the series I’m going to build the corresponding PHP script, which in this particular case will use an instance of a validation class to perform the checking task behind the scenes.
So, are you ready to learn the full details concerning the definition of this PHP class? Then let’s get started right now!
Next: Review: building a form validation program using Progressive Enhancement >>
More JavaScript Articles
More By Alejandro Gervasio