Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: Form elements must not be named "submit"

Tags:

jquery

When submitting an upload form, an alert shows up: Error: Form elements must not be named "submit". And no, I don't have any form elements with the name submit. I'm using jQuery version 1.3.2.

What's the fix for this?

like image 822
Randell Avatar asked Aug 24 '26 12:08

Randell


1 Answers

I just saw the problem. It's in line 54 of the jquery.form.js file which says

$(':input[@name=submit]', form).length

From API/1.3/Selectors, it says that

Note: In jQuery 1.3 [@attr] style selectors were removed (they were previously deprecated in jQuery 1.2). Simply remove the '@' symbol from your selectors in order to make them work again.

I probably got the problem when I replaced my jQuery version from 1.2 to 1.3. Now, I either have to modify that line or replace my version of jquery.form.js.

like image 149
Randell Avatar answered Aug 26 '26 00:08

Randell



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!