在Jquery UI对话框中的Uploadify => Chrome& Opera bug [英] Uploadify inside Jquery UI Dialog => Chrome & Opera bugs

查看:159
本文介绍了在Jquery UI对话框中的Uploadify => Chrome& Opera bug的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下代码:

 <!DOCTYPE html> 
< html>
< head>
< link rel =stylesheettype =text / cssmedia =screenhref =jquery-ui-1.8.9.custom.css/>
< script type =text / javascriptsrc =jquery-1.5.min.js>< / script>
< script type =text / javascriptsrc =jquery-ui-1.8.9.custom.min.js>< / script>
< script type =text / javascriptsrc =jquery.uploadify.js>< / script>
< / head>
< body>
< script type =text / javascript>
manualLightboxContent = function()
{
$(#dialogContent)。html($('#module_wrapper')。html());
$(#dialogContent)。dialog({'modal':true});
}
< / script>
< a href =#onclick =manualLightboxContent();>打开< / a>
< div id =dialogContentstyle =display:none;>< / div>

< div id =module_wrapperstyle =display:none;>
< script type =text / javascript>
$()。ready(function(){
$('#uploadFile')。uploadify({
'swf':'uploadify.swf',
'fileObjName' :uploadFile
});
});
< / script>
< input id =uploadFiletype =filename =uploadFile/>
< / div>
< / body>

< / html>

我无法找到原因,但在Chrome中,我无法打开浏览窗口。完全像是有一些看不见的div浮在swf上。



在opera中,这个bug并不重要:SELECT FILES文本在swf下面而不是在



如果uploadify不在jQuery UI对话框中,它就可以工作。



任何人都可以解释为什么这个bug发生?

编辑:
使用Uploadify 3.

解决方案

我最近遇到了同样的问题,查了一下代码后,我注意到了第193行的以下内容:

  jQuery('#'+ swfuploadify.movi​​eName).css({position:'absolute','z-index':1,'left':'0px'}); 

只需将z-index更改为9999就可以了

  jQuery('#'+ swfuploadify.movi​​eName).css({position:'absolute','z-index':9999,'left':'0px'} ); 


I have the following code:

<!DOCTYPE html>
<html>
    <head>
        <link rel="stylesheet" type="text/css" media="screen" href="jquery-ui-1.8.9.custom.css" />
        <script type="text/javascript" src="jquery-1.5.min.js"></script>
        <script type="text/javascript" src="jquery-ui-1.8.9.custom.min.js"></script>
        <script type="text/javascript" src="jquery.uploadify.js"></script>
    </head>
    <body>
        <script type="text/javascript">
            manualLightboxContent = function ()
            {
                $("#dialogContent").html($('#module_wrapper').html());
                $("#dialogContent").dialog( { 'modal': true } );
            }
        </script>
        <a href="#" onclick="manualLightboxContent();">Open</a>
        <div id="dialogContent" style="display:none;"></div>

        <div id="module_wrapper" style="display:none;">
            <script type="text/javascript">
            $().ready(function() {
                $('#uploadFile').uploadify({
                    'swf'  : 'uploadify.swf',
                    'fileObjName' : "uploadFile"
                });
            });
            </script>
            <input id="uploadFile" type="file" name="uploadFile" />
        </div>
    </body>

</html>

I can't find why, but in chrome, I'm not able to open the browse windows. Exactly like if there was some invisible div floating over the swf.

In opera, the bug is less important: the SELECT FILES text is under the swf instead of over.

If uploadify is outside a jquery UI dialog, it works just fine.

Can anyone explain me why this bug occur ?

Edit: Using Uploadify 3.

解决方案

I recently had the same problem, after looking up a bit at the code i have noticed the following at line 193:

jQuery('#' + swfuploadify.movieName).css({position: 'absolute', 'z-index': 1, 'left' : '0px'});

Simply changing the z-index to 9999 worked for me

jQuery('#' + swfuploadify.movieName).css({position: 'absolute', 'z-index': 9999, 'left' : '0px'});

这篇关于在Jquery UI对话框中的Uploadify =&gt; Chrome&amp; Opera bug的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆