NavigationUser login |
jQuery saves baconJust imagine the scenario, the Sales Manager comes along and asks you to fix a form that is broken, it's urgently needed, and some check boxes displayed on the form are not working. Sounds straightforward so you agree to take a look, then the nightmare begins ... It turns out that the code that generates the form is 1300+ lines of spaghetti PHP. The code that handles it is another (different) 1300+ lines of equally 'good' code. There is no documentation. There is no design document. There are no functions. No unit tests. The PHP files have no headers explaining what they do, and you just agreed to fix them, the problem is that just about any change you make WILL make matters worse. Enter jQuery. Instead of trying to handle the whole form in PHP just handle the checkbox tick and untick events in jQuery calling on your own nicely developed, tested and documented code using jQuery's AJAX calls. Wonderful!
|
Recent blog posts
|