Fixing Javascript Error: Property ‘submit’ of object #<HTMLFormElement> is not a function

Posted in Web Development on 1 April 2012 1 comment

Property ‘submit’ of object # is not a function

If you come across this error in javascript, most probably you are trying to submit the form dynamically using javascript. Don’t worry, the solution is easy.

The Solution

Check your <form> element. It MUST not have any HTML element with ID attribute of “submit”.
If you have such element, rename the ID attribute to some other name.

Explanation

Let’s say if your form element has a button with ID “submit”. When you trigger yourform.submit(), your browser actually tries to run your button element as a function instead of running the form’s submit function.

Hope this helps. Please “Like” this post if it works for you :)

 

Posted by Zen on 1 April 2012 • 16,129 visits 1 comment
Tags :


or Subscribe to specific category only :




  - 1 Comments


courtney123 says:

I would like to take the opportunity of saying thanks to you for the professional instruction I have often enjoyed going to your site. I am looking forward to the commencement of my university research and the complete preparation would never have been complete without coming over to this site. If I may be of any help to others, I’d personally be pleased to help as a result of what I have gained from here.

ZVN Properties

Leave a Reply

You must be logged in to post a comment.

Previous Post
«
Next Post
»