Philip Hallstrom wrote:
>> It must be simple, but I haven't been able to figure it out.
>
> If it's the first form this would work:
>
> <%= javascript_tag "$$('form input[type=text]').first().focus()" %>
Also don't forget to include the Prototype scripts in the <head> section
to use the $$ method:
<%= javascript_include_tag :defaults %>
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---