function newrecord(e)
{
e.preventDefault();
var form = $(this)[0];
formData = new FormData(form);
console.log(formData);
}
var form = $(this)[0];
var formData = new FormData(form);
$.ajax({
url : 'upload.php', // your url
type : 'POST',
data : formData,
processData: false, // tell jQuery not to process the data
contentType: false, // tell jQuery not to set contentType
success : function(data) {
console.log(data);
}
});