I'm using ajax file upload to upload a file together with other form contents but it doesn't seems to work.
$.ajaxFileUpload({
url: './uploadtest.php',
secureuri: false,
fileElementId: 'userfile',
dataType: 'json',
success: function (data, status) {
if (data.status != 'error') {
$('#userfile').val('');
}
}
});
Problem is the other form contents like text field are not submitted. Is it possible to submit them all at once using AJAX?
<form id="myform" method="post" accept-charset="utf-8" enctype="multipart/form-data">
<input type="file" name="userfile" size="20" id="userfile" />
<input type="text" name="nameuser" size="20">
<br /><br />
<button id="test">Send</button>