How to populate param. value for the http://valums.com/ajax-upload/ javascript correctly?
I want to pass some image title by
params: {
param1: imgTitle
},
Where $("#ImageTitle").val();
refers to <input type="text" id="ImageTitle" name="ImageTitle" value="" />
Any help please!
Thank you!!!
UPDATES:
The final solution is here.
<script type="text/jscript">
var uploader = new qq.FileUploader({
element: document.getElementById('file-uploader-demo1'),
allowedExtensions: ['jpg', 'jpeg', 'png', 'gif'],
sizeLimit: 2147483647, // max size
action: '/TradeshowSpeakers/UploadFile',
multiple: false,
onSubmit: function (id, filename) {
this.params.param1 = $("#ImageTitle").val();
},
onProgress: function (id, fileName, loaded, total) {
},
onComplete: function (id, fileName, responseJSON) {
//alert(responseJSON[0].Image);
}
});
obj.property = 'foo';
also see this – T I Jan 6 '12 at 16:33var imgTitle
withthis.params.param1 = $('#imageTitle').val();
and changeparam1: imgTitle
toparam1: ''
– T I Jan 6 '12 at 16:39