But I think the problem is that your functions are far too specific. Writing a function for "blur the element #fname" makes no sense. Define a general function blur() and refer to the current element via "this".

Regex Problem.

Thanks buddy.but unfortunately the thing that i know about 'this' keyword after searching a lot is "when we use this keyword in a function and call that function on any event in an <input> tag then 'this' keyword points toward that <input> tag".
So please tell me how to use it briefly.

Originally Posted by Jacques1

Hi,

um, don't you already have the two checks in one "if" statement?

But I think the problem is that your functions are far too specific. Writing a function for "blur the element #fname" makes no sense. Define a general function blur() and refer to the current element via "this".