Hey, just a quick question, I was using the focus function on elements and it seemed to be working fine because it was working in IE7, IE8 and all of the good browsers. When I tried it in IE6…nothing. It is a very basic line.
element.focus();
VERY basic. So does IE6 have a bug or problem with this function? I know the element object exists, I have tested for all of that and it works in all other browsers.
Thanks for any help you can give.
Are you creating the
<input>element dynamically? Stackoverflow might already have the answer.Update
Running Windows XP SP3 with IE6, I wasn’t able to duplicate the issue you describe with the following file:
It always put focus on
field2as expected. The following file works as expected too:Are you using
application/javascriptas thetypefor your<script>? I know IE6 has issues with that. Perhaps posting an example that can duplicate the issue will help determine why it’s not working.