Message Font: Serif | Sans-Serif
No. of Recommendations: 0
But, I want to use this to set the focus to an <INPUT> tag which, by definition, does not have an "id". It has only a "name".

Can someone tell me how I go about setting the focus to such a field?

Inputs most certainly can have an ID attribute in addition to a name. ( So, you can just use that.

Or, if you want to stick with the name, you can do:


Print the post  


When Life Gives You Lemons
We all have had hardships and made poor decisions. The important thing is how we respond and grow. Read the story of a Fool who started from nothing, and looks to gain everything.
Contact Us
Contact Customer Service and other Fool departments here.
Work for Fools?
Winner of the Washingtonian great places to work, and Glassdoor #1 Company to Work For 2015! Have access to all of TMF's online and email products for FREE, and be paid for your contributions to TMF! Click the link and start your Fool career.