On 3 Mar., 08:41, Srikanth Jeeva <[email protected]>
wrote:
> ya i can do it with JS,
> any way in rails??

You can approach this by making Rails generate some JavaScript for
you. I've put together a little example: http://pastie.org/405697 Call
the method somewhere in your view and the method _should_ make some
JavaScript to focus on the first field in your form that has errors.
Keep in mind that it's untested so if it doesn't work you might need
to fix an error or two, or maybe ask for help here.

--
Cheers,
David Knorr
http://twitter.com/rubyguy

--~--~---------~--~----~------------~-------~--~----~
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