Jquery and HTML FormData returns "Uncaught TypeError: Illegal invocation" Jquery and HTML FormData returns "Uncaught TypeError: Illegal invocation" ajax ajax

Jquery and HTML FormData returns "Uncaught TypeError: Illegal invocation"


jQuery processes the data attribute and converts the values into strings.

Adding processData: false to your options object fixes the error, but I'm not sure if it fixes the problem.

Demo: http://jsfiddle.net/eHmSr/1/


I had the same problem

I fixed that by using two options

contentType: falseprocessData: false

Actually I Added these two command to my $.ajax({}) function


Adding processData: false to the $.ajax options will fix this issue.