How to HTML5 FormData Ajax

The action should be part of the data object:

var formdata = new FormData();
formdata.append('name', 'This is Name');
formdata.append('action', 'plugin_save');

$.ajax({
    url: 'admin-ajax.php',
    type: 'POST',
    data: formdata,
    contentType:false,
    processData:false,
    success: success,
    error: error
});

Leave a Comment

error code: 523