How to pass a vlue to an ajaxUpload function?

Posted by iMad on Stack Overflow See other posts from Stack Overflow or by iMad
Published on 2010-06-09T22:13:23Z Indexed on 2010/06/09 22:32 UTC
Read the original article Hit count: 154

Filed under:
|
|

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);
        }
    });
};

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about AJAX