[jQuery] $.ajaxFileUpload into an ajax form
hi
i'm using the ajaxfileupload plugin from this site
http://www.phpletter.com/Our-Projects/AjaxFileUpload/ (which works
great) in a form with different kind of input file. The form is
"ajaxed" through the $.ajax jquery function. Following the form
submitting is a mail with the data from the form.
Problem: i use the '$.ajax' and the '$.ajaxFileUpload' on the same
form which calls for the same php file, which is now called twice,
once per function. So everytime i submit the form two mails are sent,
one with the data the other with the file attached.
How can i integrate the ajaxfileupload in my form? anyone does know
this plugin?
Thanks Vitto
this is my form submit ajax function:
$.ajax({
type: "POST",
url: "curriculumInvio.php",
data: myData,
success: function(){
myFunction
}
});
this is the plugin ajax function:
$.ajaxFileUpload({
url:'curriculumInvio.php',
secureuri:false,
fileElementId:'fileToUpload',
dataType: 'json',
success: function (data, status){
plugin stuff,
}
});