This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
You have a "small" mistake in you html code.
is to say, you are calling the element by the ID name but.... in you html code you forget to put the ID name!
the correct way is:
and it will work.
Joined: Sep 22, 2010
Thanks for your reply.
But, here i am using name as id. That is not a problem.
That code also working which way i am using.
what is my problem is the focus is setting on the component, but it not visible.
If we press tab for setting the focus, the focus will be set in the component with doter [-----]box on the component[please check the attachment].
But the doter line is missing when i am setting focus in my code.
I hope you got my problem.
Please check the attached screen shot which i want.
Deva devan wrote:But, here i am using name as id. That is not a problem.
Yes, it is. name and id are not interchangeable. Some toy browsers that don't follow standards may allow it, but others may not. Do it the right way and make sure that you use id for all elements that need to be referenced.
Also, please be sure to use code tags when posting code to the forums. Unformatted or unindented code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please click this link ⇒ UseCodeTags ⇐ for more information. Properly indented and formatted code greatly increases the probability that your question will get quicker, better answers.
I think a major part of the problem is that the browser is using Quirks mode which at best has unpredictable results. It's worth getting in to the habit of making sure any HTML you write has a doctype specified. At its simplest replace the <html> with:
Testing your latest sample html (with id's specified) and adding a doctype, it works for me in IE8, Chrome.
If you are still having problems can reply with details of which browser you are testing in.