How to pass a vlue to an ajaxUpload function?
- by iMad
This is my Html code and I'm trying to pass my id(test1) to fileUp function. It only works when I type 'test1' and stops working when I'm trying to pass a variable. Please let me know if there is a way to overcome this problem.
<a id='test1' href="#" onclick="fileUp(1, 'test1')">Upload Your file</a>
function fileUp(id,nameTest){
var test=nameTest;
new AjaxUpload(nameTest , {
action: 'upload-test.php',
onComplete: function(file, response){
alert(response);
}
});
};