Forum: Ruby on Rails newbie q: Form element focus

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ryan B. (Guest)
on 2005-12-15 01:03
This is probably a dumb question, but is there an easy way to set the
focus of a form to the first visible/editable element?  I've been
googling lots and searching documentation and haven't come up with
anything.  Help would be appreciated.
Kyle M. (Guest)
on 2005-12-15 02:45
(Received via mailing list)
In javascript assuming you have the prototype, etc libraries

$('form_element_id').focus()
This topic is locked and can not be replied to.