I have a form to user login:
<%= form_tag(@action, :method => \"post\", :name => \'signup\' ,:onSubmit => \'return validate();\') do %>
I answered this in another post.
It is a friendly way for validating forms if you do not want to write it all from scratch using an existing jquery plugin. Check it out and if you like it let me know!
Check username availability using jquery and Ajax in rails