jQuery Handler error is not a function

前端 未结 2 1453
执笔经年
执笔经年 2021-01-12 10:59

I am using jquery ajax fileupload. the file is uploaded correctkly but i got error like

TypeError: jQuery.handleError is not a function
[Break On This Error         


        
2条回答
  •  失恋的感觉
    2021-01-12 11:24

                 if(typeof(data.error) != 'undefined')
                {
                    if(data.error != '')
                    {
                        alert(data.error);
                    }else
                    {
                        alert(data.msg);
                        showprofilepicture();
                    }
                }
    

    should be

    jQuery.ajaxFileUpload({
                url:'',
                secureuri:false,
                fileElementId:'fileToUpload',
                dataType: 'json',
                data:{'image_desc':image_desc,'gallery_id':curr_time_stamp},
                success: function (data, status)
                {   
    
                     if(typeof(data.error) != 'undefined')
                    {
                        if(data.error != '')
                        {
                            alert(data.error);
                        }
                    }else
                        {
                            alert(data.msg);
                            showprofilepicture();
                        }
                }
    
            }
        ) 
    

提交回复
热议问题