dongsetan3216 2010-11-22 16:15
浏览 93
已采纳

uploadify firefox崩溃onsuccess响应警报

i am implementing uploadify on my web to upload photos, and i trigger a response on success, everything is running well on chrome and IE 8, but firefox crashed every time the response alert pops up, nothing can be clicked, i cant even close the alert or the firefox, while firefox is still running on task manager's process, is it the code or is it my firefox ??

here's my uploadify code:

$('#file_upload').uploadify({
    'uploader'          : '/apaapaapa/clientside/js/uploadify/uploadify.swf',
    'script'            : '/apaapaapa/backend_admin/processes/anak.php',
    'cancelImg'         : '/apaapaapa/clientside/js/uploadify/cancel.png',
    'fileExt'           : '*.jpg;*.gif;*.png',
    'fileDesc'          : 'Web Image Files (.JPG, .GIF, .PNG)',
    'multi'             : true,
    'queueSizeLimit'    : 5,
    onAllComplete       : function(event, ID, fileObj, response, data){
                                $('#responseUploadify').html(response);

                            },
    onError             : function (event,ID,fileObj,errorObj) {
                                $('#responseUploadify').html(response);
                            }

});

and here's my upload code:

if(!empty($_FILES)) {
    $number         = implode(random_activation_code(3));   
    $path_parts     = pathinfo($_FILES['Filedata']['name']);
    $ext            = $path_parts['extension'];

    if($ext == 'jpeg' || $ext == 'jpg' || $ext == 'gif' || $ext == 'png'){
        $page = 'kids';

        $pic = new Gallery();       
        $pic->attach_file($_FILES['Filedata'], $page, $number);
        $pic->created       = time();

        if($pic->save()){
            echo "Success!";
        }else{
            echo "Failed";
        }
    }else{
        echo "Ooops.... extension error";
    }   
}
  • 写回答

1条回答 默认 最新

  • duan7264 2010-11-22 17:44
    关注

    alert in the onComplete crash Firefox, it's normal... Display the response in a div.

    HTML :

    <div id="responseUploadify"></div>
    

    JS :

    onComplete          : function(event, ID, fileObj, response, data){
                                    $('#responseUploadify').html(response);
                                }
    

    Hope this help.

    PS: Sorry for my bad english ^^

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 微信会员卡等级和折扣规则
  • ¥15 微信公众平台自制会员卡可以通过收款码收款码收款进行自动积分吗
  • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
  • ¥15 gdf格式的脑电数据如何处理matlab
  • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
  • ¥100 监控抖音用户作品更新可以微信公众号提醒
  • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
  • ¥70 2048小游戏毕设项目
  • ¥20 mysql架构,按照姓名分表
  • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分