Forum: Ruby on Rails Positioning cursor to first form field

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.
126b0334283d7591603c5e00a40c0b8f?d=identicon&s=25 Ror Directory (rordirectory)
on 2006-06-09 21:59
whenever I display the form to the users now the user has to click on
the first field; how do I make it automatically positioning on the first
user enterable form element (is there any javascript helpers)

thanks
Abb249055208c7af4d35568e422dfd63?d=identicon&s=25 Guest (Guest)
on 2006-06-09 23:25
ror directory wrote:
> how do I make it automatically positioning on the first
> user enterable form element (is there any javascript helpers)

Use Prototype

<%=javascript_tag('Form.focusFirstElement("form-dom-id")')%>
This topic is locked and can not be replied to.