I'm trying to set the initial focus to some specific form
field on a page.

I can use a prototype call to do something like:

<% form_tag .... %>
 <%= text_field_tag ... %>
 <script>$('text_field_id').focus();</script>
<%= some_other_field_tag... %>

and it works, but I'm just wondering if there was a cleaner
way that I'm missing.  Ideally, I'd like not to have to
explicitly state the id of the input element.  Have I missed out
on an :initialfocus => true option to the form field helpers
or anything like that?

Thanks...

                -glenn
_______________________________________________
Sdruby mailing list
[email protected]
http://lists.sdruby.com/mailman/listinfo/sdruby

Reply via email to