focus not working in Firefox

I am using the following jquery/function to bring the focus back into a text box if the proper number isn't returned. It works fine in IE but in Firefox the "focus" doesn't work. It allows the user to move to the next field after displaying the error. Can someone assist?

function CheckTheNum(ID) {
    var cfcAsAjax = new jsobj();
    x = cfcAsAjax.CheckTheNum(ID);
    if (x == true) {
        //    document.getElementById('labelNum').innerHTML = '<span>Number:</span>';
    } else {
        jQuery("#labelNum").html("<span>The Number:</span><br /><span class='red'><strong>Please enter a valid number</strong></span>");
        if (ID != "") {

Open in new window

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

replace :

Open in new window

by :

Open in new window

OR by :
setTimeout(function() {
, 800);

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Michel PlungjanIT ExpertCommented:
800 is too slow I would think

It is generally a bad idea to focus on blur as I suspect the asker is
I agree, just a big one to get the right feedback
earwig75Author Commented:
Yes this is happening onblur. Is this a bad idea? Will the first solution work?
you're just asking if the jQuery team do the right job...

now in some contex (maybe in your context) it may not work
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.