[jQuery] Submitting form multiple times using .each()
I am working on a page that has multiple file uploads, and the user
can add more if they need to. To submit it to the server, I need to
send them one at a time, so I was thinking I could use the .each()
function to loop through the file input fields that have been added,
and submit each one separately, maybe using the form plugin.
I know how I would do it if I could submit it using ajax, but I know
files cannot be submitted using ajax.
Here is how I would do it using ajax:
$("#adminToolsListing :file").each(function() {
// Pass the values to ajax post
$.ajax({
type: "POST",
url: this.value
});
});
Would something like this be possible, but using a normal form submit,
and returning the server response each time?