我有以下代码:
<!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>
Run Code Online (Sandbox Code Playgroud)
我找不到原因,但在Chrome中,我无法打开浏览窗口.就好像是有一些看不见的div漂浮在瑞士法郎上.
在Opera中,错误不太重要:SELECT FILES文本在swf下而不是结束.
如果uploadify在jquery UI对话框之外,它可以正常工作.
任何人都可以解释为什么会发生这种错
编辑:使用Uploadify 3.
不知道我在这里做错了什么.只是想让它成为一个模态对话框(使页面内容变暗).我觉得它很简单modal:true.单击图像时会出现一个对话框,但不会使页面内容变暗.
<img src="images/help-35-30.png" alt="Help" class="helpdetails" style="padding-left:30px;"/>
<div class="dialogplease"><p>A comment</p></div>
<link rel="stylesheet" type="text/css" href="mycss/css/jquery-ui-1.8.20.custom.css" />
<script language="javascript" type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script language="javascript" type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.20/jquery-ui.js"></script>
<script>
$(function() {
$('.dialogplease').dialog(); //init dialog
$('.dialogplease').dialog('close'); //don't show dialog yet
$('.helpdetails').click(function(e) {
$('.dialogplease').dialog('open')({
modal: true
});
});
});
</script>
Run Code Online (Sandbox Code Playgroud)