Skip to content Skip to sidebar Skip to footer

Typeerror: E[h] Is Not A Function

I've been using jquery 1.6 with no problem. Today I switched to jquery 1.8 and suddenly I am getting this error when trying to submit a form: TypeError: e[h] is not a function. Fo

Solution 1:

Remove the line below.

<inputtype="submit" name="login"id="submit" style="visibility:hidden" />

Update:

Or if you have to use the submit input, then you need to change the id submit to something else. The reason is that if you have an input element with id of submit, it will set a submit property to the form with the HTMLInputElement. So you could not call the .submit method on the HTMLFormElement.

Solution 2:

I waster 3 hours trying to fix the same issue, I was using the name='submit' for my submit button and was calling $("#form_name").submit(); in a function and was getting the error. Sometimes small things I overlook end up wasting lot of time.

Solution 3:

i think it's because the line

<inputtype="submit" name="login"id="submit" style="visibility:hidden" />

can you remove it and retry?

Solution 4:

When we use a submit type element in a form, This element will be set as Submit property of the form. So one could not call the submit() function with other element of form.

There are two ways to do this. first one is just remove the line as given in first reply.

Or Use $("#submit").trigger("click"); instead of $("#login").submit();. and it will submit the form on pressing enter key word too.

Solution 5:

Your form and input have the same name attribute value, login.

Change the name on the input to something else, like submit. This should clear up your error.

Post a Comment for "Typeerror: E[h] Is Not A Function"