ruby on rails 3 - Rails3 setting focus on a textfield -


when have errors in form, set focus first textfield error. i've done php , javascript in past, i'm not sure how approach in rails3.

thanks in advance

<%= javascript_tag "$('foo_bar').focus()" %> 

Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -