使用ajaxuploadfile遇到的问题处理

最近在项目中使用ajaxuploadfile.js,遇到了几个问题。

1. 没有handleError()的错误

原因:该方法已经被jquery去除。

解决方法:在ajaxuploadfile.js中添加该方法。例如:

handleError: function( s, xhr, status, e )      {  

// If a local callback was specified, fire it

if ( s.error ) {  

                   s.error.call( s.context || s, xhr, status, e );  

               }  

// Fire the global callback

if ( s.global ) {  

                   (s.context ? jQuery(s.context) : jQuery.event).trigger( "ajaxError", [xhr, s, e] );  

               }  

  }

2.在ie9 ,根本没有提交。

原因:我用了一个div的click事件触发file的click事件,绑定file的change事件提交。但是ie出于所谓安全,不允许这样。

解决:将file框透明,与div重叠。

file框的css:

  margin-left:-350px;

   font-size:30px;    cursor:pointer;

   filter:alpha(opacity=0);    opacity : 0;    border : none;

你可能感兴趣的:(jquery,function,status,local,specified)