focus() not working in IE on reload

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
rocksolidhq
Forum Newbie
Posts: 17
Joined: Tue Jul 22, 2008 7:55 pm

focus() not working in IE on reload

Post by rocksolidhq »

Hey All,

I have a page with 2 forms that i have a couple of simple focus() commands for and a bunch of other more complex stuff happening that the inoperable focus() is buggering up.

When you load this page (http://www.rocksolidhq.com/cabease/ibs_source) the first time the focus is set on an input box with an id of 'webAccountID'. Everything so far, is right in the world. If i put my cursor in one of the other input boxes and then reload the page, then the focus() does not take effect. Rather the cursor returns to the box that i had it in when i reloaded. This mainly becomes a problem when i submit the top form with an error and the page reloads. The focus should be back in the webAccountID box.

This is not the case in Firefox. It works as it should in Firefox.

Any help with this would be greatly appreciated.

thanks in advance,
dean
Post Reply