I tried to do this for working with a part of values from a html-form.
var formData = new FormData();
formData.append('file', $('#FORM_ADD_LANG_FILE')[0].files[0]);
formData.append('add_lang_code', $('#FORM_ADD_LANG_CODE').val());
formData.append('job', jobid);
var post_setting = new Array(false,false);
But in my console it is showing the following error and I don't know why it is
"TypeError: 'append' called on an object that does not implement interface FormData."
I generate the ajax-call by this function
function getAJAXcall(processData, contentType, formData, callback) {
var returnValue = {
url: '".$global['serverurl']."module/".$m['ID']."/code/cms_data.php',
type: 'POST',
data: formData,
success: callback
};
if (processData === **false**) returnValue.processData = processData;
if (contentType === **false**) returnValue.contentType = contentType;
}
And call them up in this way
$.ajax(getAJAXcall(post_setting[0], post_setting[1], formData, function(result)
{ ...my callback functions... }
Also i try to change the post_setting = new Array(false,false); to true, true but the result was the same