Any ideas here would be appreciated. I'm stumped.

I have a script that runs when the page is loaded to set focus to a field. If I have an alert immediately before I call focus() on the field everything is good. If the alert isn't there, the cursor never shows up in the field...however, it scrolls to the textbox and if I hit tab I move to the field immediately following it which would indicate I really do have focus on the field, yet the cursor isn't there so I can't start typing in the field. I thought it might be an issue with the page not being fully loaded but if that is the case why does it scroll down to the field and move to the next field after hitting tab. This is a hard one to explain and what complicates it more is that it's in an AJAX responseText environment so it's hard to nail down. Any ideas on this?