jQuery send more then one formdata
Currently my code is
$('#fileupload').bind('fileuploadsubmit', function (e, data) {
// The example input, doesn't have to be part of the upload form:
var adultinput = $('#adult');
data.formData = {adult: adultinput.val()};
if (!data.formData.adult) {
input.focus();
return false;
}
});
Which works just fine to send a post data with adult value from the html code
However there's another input form called thumbsize which i want to send
as well,
I tried
$('#fileupload').bind('fileuploadsubmit', function (e, data) {
// The example input, doesn't have to be part of the upload form:
var adultinput = $('#adult');
var thumbsize = $('#thumbsize');
data.formData = {adult: adultinput.val()};
data.formData = {thumbsize: thumbsize.val()};
if (!data.formData.adult) {
input.focus();
return false;
}
});
But it doesn't seem to work, is there anyway i can go about sending
another parameter?
Thanks!
No comments:
Post a Comment