I have an event that uses a class selector for 10 textboxes.
I am checking to see if the value is numeric. If there is an error I am doing a this.focus() to go back to the textbox I just left. The problem is that end up getting 2 blur events.
For example, if I am on the 3rd textbox, enter a value then tab to the 4th textbox. This causes a blur on the 3rd textbox as well as the 4th checkbox when the focus goes back to the 3rd textbox.
How do I solve this problem?
Thanks,
Tom
I am checking to see if the value is numeric. If there is an error I am doing a this.focus() to go back to the textbox I just left. The problem is that end up getting 2 blur events.
For example, if I am on the 3rd textbox, enter a value then tab to the 4th textbox. This causes a blur on the 3rd textbox as well as the 4th checkbox when the focus goes back to the 3rd textbox.
How do I solve this problem?
Code:
$(".numeric0").blur(function (event) {
if (!isNumericOrBlank($(this).val(), 0))
{
$(this).parent().find('.validMessage').show();
[highlight #FCE94F]this.focus();[/highlight]
}
});
Thanks,
Tom