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  


What was Your Dumbest Investment?
Share it with us -- and learn from others' stories of flubs.
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.
Community Home
Speak Your Mind, Start Your Blog, Rate Your Stocks

Community Team Fools - who are those TMF's?
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.