jQuery form submit() is not working in IE6?

Prashant picture Prashant · Jan 15, 2009 · Viewed 30.9k times · Source

I want to submit a with using jquery as below;

$("#formid").submit();

Its working perfect in all browsers except IE6.

How to make it work in IE6 ??

Answer

I.devries picture I.devries · Jan 15, 2009

You probably have an <input name="submit" /> somewhere in your form, which overwrites the function "submit" of the form in IE.

Edit:

I have tested in some other browsers. The latest versions of all major browsers seem to be affected by this issue.

  • IE - all versions
  • Firefox 4+
  • Chrome at least since version 12
  • Opera at least since version 11

Bottom line: Never name your inputs "submit", or any other default property or method of the form element (e.g. "action" or "reset") . See MDC for a complete overview.