Has never run into this issue? I'm getting this error in the latest release of jQuery. I tried with version 1.6.2 and there is no issue.
TypeError: '[object HTMLInputElement]' is not a function (evaluating 'elem[ type ]()')
line 3175
Has anything changed that we should be aware of?
Thanks, Jack
I have found that this error will occur when using the
onclick
attribute to call a JavaScript function with the same name as either theid
orname
attributes on aninput
element:This behavior occurs irrespective of input type.
This usually happens if any of your
input
tag's name issubmit
. For example,On the above code,
document.getElementById("frm").submit
represents theinput
element. When you apply()
tosubmit
It shows this error.I hade a similar issue with safari recently on a bit of javascript to submit a form. Turned out to be due to the submit input element having the
name="submit"
, which was conflicting causing it to return it as not being a function.