Sunday, December 14, 2008

To check the Javascript Function Exists or not

Check if a Javascript Function Exists or Is Defined

To check if a Javascript function exists before calling it, try this:

if(typeof yourFunctionName == 'function') { 
yourFunctionName(); 
}