Firefox and “… is not a function’ Javascript Errors
Posted on June 13, 2006
Filed Under /dev/null/ | 226 views |
If you’re calling a Javascript function from a form, say onSubmit(), and you keep getting this error in Firefox:
<functionname> is not a function
check to see if another element in your page, in my case the form itself, has the same name as the function you’re trying to call. If it does it seems that it attempts to execute that page element rather than the JS function, which causes that error.
Oobviously renaming one or the other fixes the issue.