submit is not a function
means that you named your submit button or some other element submit
. Rename the button to btnSubmit
and your call will magically work.
When you name the button submit, you override the submit()
function on the form.
More Related Contents:
- How to make JavaScript execute after page load?
- How do I programmatically set the value of a select box element using JavaScript?
- Check if an element contains a class in JavaScript?
- How to correctly iterate through getElementsByClassName
- JavaScript Form Submit – Confirm or Cancel Submission Dialog Box
- Appending HTML string to the DOM
- innerText vs innerHTML vs label vs text vs textContent vs outerText
- Why is the value of my input always empty if I store it in a variable?
- Best Practice: Access form elements by HTML id or name attribute?
- Difference between Node object and Element object?
- Why are duplicate ID values not allowed in HTML?
- HTML “overlay” which allows clicks to fall through to elements behind it [duplicate]
- How to convert a DOM node list to an array in Javascript?
- JavaScript get element by name
- Is there a DOM event that fires when an HTML select element is closed?
- Difference between Element.value and Element.getAttribute(“value”)
- Why is the variable holding the input value always logged as empty?
- HTML DOM: Which events do not bubble?
- How do I put codes from jsfiddle.net into my website?
- Screen Scraping from a web page with a lot of Javascript [closed]
- Attach event listener through javascript to radio button
- window.getSelection() gives me the selected text, but I want the HTML
- a way to check validity of HTML5 forms?
- Is there a way to get innerText of only the top element (and ignore the child element’s innerText)?
- How to properly unload/destroy a VIDEO element
- How to get on-screen visible element objects in jQuery? [duplicate]
- How can I detect a Scrollbar presence ( using Javascript ) in HTML iFrame?
- How to get element by class name
- Test if an element can contain text
- Replacement for deprecated `keypress` DOM event