cms icon indicating copy to clipboard operation
cms copied to clipboard

TypeError: Argument 1 of FormData.constructor does not implement interface HTMLFormElement.

Open hefengbao opened this issue 9 years ago • 13 comments

Firefox, save new menu

TypeError: Argument 1 of FormData.constructor does not implement interface HTMLFormElement.
app.create()                                              admin.js:176
<匿名>                                                      admin.js:82
n.event.dispatch()                                     jquery.min.js:3
n.event.add/r.handle()                              jquery.min.js:3

hefengbao avatar Jun 07 '16 01:06 hefengbao

yes,me too

yyggg avatar Jun 22 '16 08:06 yyggg

I got this problem too... what is the solution?

rawbinn avatar Aug 05 '16 10:08 rawbinn

Ok i got the solution. Don't pass the files into the constructor var formData = new FormData($(forms));

Use like this var formData = new FormData();

rawbinn avatar Aug 05 '16 10:08 rawbinn

var userPassFormData = new FormData(this); there is no any form for pointing. this code running for chrome(some times) but not working for Mozilla firebox even one time. error in Mozilla -----> TypeError: Argument 1 of FormData.constructor does not implement interface HTMLFormElement

BoyNoogler avatar Jun 20 '19 10:06 BoyNoogler

var userPassFormData = new FormData(this); there is no any form for pointing. this code running for chrome(some times) but not working for Mozilla firebox even one time. error in Mozilla -----> TypeError: Argument 1 of FormData.constructor does not implement interface HTMLFormElement

Hi @BoyNoogler i am also facing the similar issue. Did you got any solution

devendratata avatar Jun 27 '19 06:06 devendratata

@BoyNoogler did you get any solution? , or anyone have solution for this?

deviamalia avatar Jun 28 '19 12:06 deviamalia

var userPassFormData = new FormData(this); there is no any form for pointing. this code running for chrome(some times) but not working for Mozilla firebox even one time. error in Mozilla -----> TypeError: Argument 1 of FormData.constructor does not implement interface HTMLFormElement

Hi @BoyNoogler i am also facing the similar issue. Did you got any solution

Hi @devendratata did you got similiar issue? , and how can you got soluiton for this?

deviamalia avatar Jun 28 '19 12:06 deviamalia

Same issue for me. Did you find a solution ?

kentatoi avatar Aug 31 '19 03:08 kentatoi

Same issue for me. Did you find a solution ?

don't pass file into the constructor. you can using the same as:

var formData = new FormData(); formData.append('file', file);

tuanbku107 avatar Sep 16 '19 02:09 tuanbku107

I was able to solve the same problem as follows: var myForm = $("#form")[0] data: new FormData(myForm)

lucianofpaula avatar Nov 07 '19 20:11 lucianofpaula

I was able to solve the same problem as follows: var myForm = $("#form")[0] data: new FormData(myForm)

Was able to solve mine too

melvinstanly avatar Feb 03 '20 08:02 melvinstanly

data: new FormData( this[0] )

maxcccp avatar Aug 05 '20 10:08 maxcccp

if your HTML elements IDs are not the same: I had the same problem only to find that a div was sharing same ID with form

mrsabelo avatar Jan 27 '21 13:01 mrsabelo