Mar 10

Javascript Error: submit is not a function

I ran into an annoying namespace issue with JavaScript. When trying to submit() a form IĀ receivedĀ a “submit is not a function” error. Simply put the error occurs because your form has a element in it with the id of submit.

In my case it was my submit button.

<input type="submit" name="submit" id="submit" value="Go" />

Changing the id (and name) resolved the issue.

<input type="submit" name="go" id="go" value="Go" />