Link Details

You don't even have to leave your chair. Login and vote now.
Link 59221 thumbnail
User 222301 avatar

By bcswartz
via swartzfager.org
Published: Jan 02 2008 / 15:50

This is a technique I developed recently that allows me to write a single set of server-side code to validate data submitted via an HTML form that can then be executed via AJAX if the user's browser has JavaScript enabled or executed server-side via a regular form post if JavaScript has been disabled. It makes use of the jQuery JavaScript library and a particular jQuery plug-in to make it easy to write the JavaScript functions involved. My example uses ColdFusion as the server-side language, but it could just as easily have been PHP or something else.
  • 12
  • 1
  • 1128
  • 383

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.