I have a problem with setting the focus to the textbox for a login page in Ruby on Rails. I want to give focus to a user text field. Is there any way to give focus property to text_field?
Share
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.
In HTML5 you can do something like this:
The only way to achieve this without using HTML 5 is with JavaScript if I’m not mistaken. This has nothing to do with Rails, it’s an HTML attribute.