you can pass other html attributes similar to :size, e.g.
<%= f.text_field :email, :size => 30, :onchange =>
''...'', :onfocus=>
''...'' %>
etc.
personally, I like to use lowpro
http://www.danwebb.net/2006/9/3/low-pro-unobtrusive-scripting-for-prototype
which lets me extact scripting to a .js file and clean up my views
On Jun 15, 8:48 pm, Splashlin
<Splash...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> In a current project of mine I have a div field that is located behind
> a text_field that is acting like a row in a table. Whenever someone
> hovers over the whitespace in the row the background color changes.
> However, when they click the text area in the row the highlight
> disappears. I would like the highlight to remain when the text_box is
> the focus. I know how to write the javascript for this, but I
don''t
> know where to put it in the code.
>
> Code:
>
> <div id="editRow">
> <%= f.text_field :email, :size => 30 %>
> </div>
>
> Thanks
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---