The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Pre Validating Forms Using JS and Ajax

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Guy Naor

Posts: 104
Nickname: familyguy
Registered: Mar, 2006

Guy Naor is one of the founders of famundo.com and a long time developer
Pre Validating Forms Using JS and Ajax Posted: May 19, 2006 4:38 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Guy Naor.
Original Post: Pre Validating Forms Using JS and Ajax
Feed Title: Famundo - The Dev Blog
Feed URL: http://devblog.famundo.com/xml/rss/feed.xml
Feed Description: A blog describing the development and related technologies involved in creating famundo.com - a family management sytem written using Ruby On Rails and postgres
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Guy Naor
Latest Posts From Famundo - The Dev Blog

Advertisement

Filling a long form on the web just to have it fail for all kind of reasons when I submit, always bothered me. I see it as unfriendly and inconvenient to start tracking down the failure, fill in the fields that weren't saved (like passwords) and submit it again. Sometimes ad-infinitum. Especially when the error is a unique login name, or other similar fields, that might require a few tries until you find a legal one.

We found a better solution for that. We run a few local validations using JavaScript, and for validation that require database access, or some calculation not easily done on the client, we just send an Ajax call into the server, and get back an error message if something is wrong.

Now when a user submit the form, in most cases there will be no errors generated, as it's all pre-validated.

If you need some sample code or help, let me know.

Read: Pre Validating Forms Using JS and Ajax

Topic: Dr. Dobbs discovers Rails Previous Topic   Next Topic Topic: Google Notebook

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use