views:

11

answers:

1

When I have errors in a form, I would like to set the focus to the first textfield with the error. I've done this with PHP and JavaScript in the past, but I'm not sure how to approach it in rails3.

Thanks in advance

A: 
<%= javascript_tag "$('foo_bar').focus" %>
gorn
Worked perfect, thanks
Kent G
if you are satisfied with the answer, why not to check it as accepted ... thanks
gorn