At 11:52 AM -0400 9/5/07, Dell Sala wrote:
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
-- Dell:
Well of course, you never trust anything on the client side and it
makes sense to do the user input checks client-side and then validate
on server side, but that's not what we've (at at least me) have been
discussing.
The only question I've asked here is what beyond communication
without refresh does ajax provide and the only answer I've received
is "nothing", which is what I expect.
Thanks for your time.
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
_______________________________________________
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