Monday, February 8, 2010

[jQuery] Ajax Upload using valums upload plugin

Hi , i just came across this ajax upload plugin and i wish to use it inside a form as shown in the demo page example 3. For some reason i am not able to make it work. I am not sure what parameters come into the function. For example here is my sample code.

$(document).ready(function(){

/* Example3 */
        var upload = new AjaxUpload('property_i',
        {
        action: 'submitproperty.php',
        autoSubmit: false,
        onSubmit : function(file , extension){
        return false;
        }
        });
      
        var upload_data = upload.setData({
        'propertytype':'propertytype'
        });
       
       });

Now th ID used in the AjaxUpload function should be ID of the <input type = file .../> or of the Entire form. Also how do i use setData method. Any suggestions or links will be very helpful. Thanks
--
Regards,
idrish laxmidhar


No comments: