jquery.extend({ handleerror: function( s, xhr, status, e ){ if ( s.error ) { s.error.call( s.context || s, xhr, status, e ); } if ( s.global ) { (s.context ? jquery(s.context) : jquery.event).trigger( "ajaxerror", [xhr, s, e] ); } }, createuploadiframe: function(id, uri) { //create frame var frameid = 'juploadframe' + id; var iframehtml = '