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 救!ENVI5.6深度学习初始化模型报错怎么办?
  • ¥30 eclipse开启服务后,网页无法打开
  • ¥30 雷达辐射源信号参考模型
  • ¥15 html+css+js如何实现这样子的效果?
  • ¥15 STM32单片机自主设计
  • ¥15 如何在node.js中或者java中给wav格式的音频编码成sil格式呢
  • ¥15 不小心不正规的开发公司导致不给我们y码,
  • ¥15 我的代码无法在vc++中运行呀,错误很多
  • ¥50 求一个win系统下运行的可自动抓取arm64架构deb安装包和其依赖包的软件。
  • ¥60 fail to initialize keyboard hotkeys through kernel.0000000000