is there a rails way to enable a text_field to select all text upon clicking on it? If not how can I enable the JavaScript to add that type of functionality?
<% text_field value => "highlight this", :after => "onClick="SelectAll('txtfld');"" %>
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I recommend reading this article:
highlight text on click textbox
It is exactly what you want.