RicksAtWork
Programmer
Using event listners, I have attached a blur event to a set of text fields.
So, when I move out of any of these text boxes the blur event fires.
This calls a function called Checkvalues()
This checks the value of the current control.
If the controls data is incorrect, I want to reset the focus to this control.
I am doing this with the following code:
var errorMessage = CheckTaskValue(control);
if(errorMessage!=null)
{
alert(errorMessage);
control.focus();
}
In IE, this works fine, however in Firefox, it doesnt refocus.
What am I doing wrong?
So, when I move out of any of these text boxes the blur event fires.
This calls a function called Checkvalues()
This checks the value of the current control.
If the controls data is incorrect, I want to reset the focus to this control.
I am doing this with the following code:
var errorMessage = CheckTaskValue(control);
if(errorMessage!=null)
{
alert(errorMessage);
control.focus();
}
In IE, this works fine, however in Firefox, it doesnt refocus.
What am I doing wrong?