This may seem like a nub question. I’ll be the first to admit my knowledge of JavaScript is limited, I’m very desperately trying to learn, though. I’m having a bit of trouble when attempting to pass data to an additional field.
$(function () {
$('#upload_file').submit(function (e) {
e.preventDefault();
$.ajaxFileUpload({
url: './upload/upload_file/',
secureuri: false,
fileElementId: 'userfile',
dataType: 'json',
data: {
'title': $('#title').val()
},
success: function (data, status) {
if (data.status != 'error') {
$('#files').html('<p>Reloading files...</p>');
refresh_files();
$('#title').val('');
}
alert(data.msg);
}
});
return false;
});
});
As you can see above, I'm passing across the title value in the data parameter of the AJAX call. This is successful. The question is, how would I go about passin additional forum values within the data param?