On Sep 5, 2007, at 11:20 AM, tedd wrote:
Just keep the user entering data until the data is correct, then
submit the form via ajax or as one normally would via a form submit.
So, I don't see the ajax advantage here.
The problem with what you're describing is that all your form
validation code (business logic) is deployed to the browser as
javascript. For serious applications, the server cannot rely on the
client to take care of things like validation, because they can
easily be bypassed.
What ajax allows you to do is keep the heavy lifting business logic
on the server (where it belongs), but have your web page change it's
own state without having to ask the server to redraw an entire
document every time it needs some new information, or a calculation
performed.
For example: you could authenticate a user without having to refresh
the page. There is no way to do that without asking the server to
verify credentials. Ajax (or some other kind of remoting) is required
if you want to avoid a page refresh.
-- Dell
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk
NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com
Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php