Take the 2-minute tour ×  I have the following AJAX function
with JQuery:  var formData = $('#FonykerEditForm').serialize();
$.ajax ({     type: 'POST',     url: '<?php echo
$html->url('/fonykers/edit',true); ?>',     data: formData,
dataType: 'json',     success: function(response) {
if(!response.ok) {         } else {             username =
$('#FonykerUsername').val();             email =
$('#FonykerEmail').val();      error: function (xhr,
ajaxOptions, thrownError){  The problem I'm having is that a
type file field in my form is not getting submitted along with
the rest of the data of the form, how can I include the file in
the data of the ajax request?  share|improve this question Files
cannot be sent this way using ajax. Use one of the many jquery
plugins out there to do uploads. –  gAMBOOKa Aug 23 '11 at 17:08
If you really want to send a file via ajax, use HTML5 –  Tae-
Sung Shin Aug 23 '11 at 17:13 You could set the target of the
form to a hidden iFrame, then listen for the load event o