Hello,
I have the following code :
  <%= text_field "company", ''name'', {:type
=>"text", :value => "Name of
company", :style => "width:130px"}  %>
This generates a text_field with the default value "Name of company"
in
black...
What I would like is ...
Name of company would automatically disappear when a user wants to fill
out the text_field...
Anyone ?
Thank you very much !
-- 
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
Elad Meidar - Creopolis.com
2006-Dec-30  22:02 UTC
Re: How to make the text_field default value disappear
Hi Ja, (Great name :)) Rails is a server side handler, it cannot handle anything on client <--> browser <--> server cycle. In your case, you need to set a JavaScript onFocus even for the specific text field, and set it''s value to "". --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---