Rails obviously support client side validation. all you need is to put
onsubmit event on whatever the form syntax you are using. below is an
example:

<% form_tag ({:action => "new"}, {:onsubmit => "return validate();"}) %>

then your basic javascript goes like:
function validate(){
if(document.getElementById('some_id')=="")
  alert("specify first name");
}

On Wed, Sep 9, 2009 at 11:46 AM, HUNT HUNT <[email protected]
> wrote:

>
> Hi Friends,
>
> I am a newbie on ROR, I made a authentication page for login. Now For
> Validation at client side I want Javascript to be used.
>
>
> Does Rails support client side vaildation as for server side methods are
> already available?
>
> Regards
> HUNT
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>


-- 
Thanks and Regards

___________________

Puneet Pandey
Ruby on Rails Developer
http://www.puneetitengineer.wordpress.com
In Puneet's Lab: http://www.puneetpandey.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to