里面我有一个jQuery UI的对话框中,该包含<form>
含有<input type=file
>文件对话框不会出现一个jQuery-UI-对话框
对于我的一些用户,当他们点击按钮打开文件对话框:它没有出现。
,因为有这个问题将能够使用他们所有已安装的浏览器来重现电脑问题的基础不是浏览器:
- 铬
- 火狐
- 的Internet Explorer
的问题不是基于操作系统,因为我已经看到问题的发生:
-
个
- 视窗XP
- Windows 7的
- 的Kubuntu 11.04
我已经与操作系统安装虚拟机和文件对话框将可以正常使用。
所以我的问题是:任何人有任何想法是怎么回事?
这里的 “代码”:
<meta charset="utf-8">
<link rel="stylesheet" href="http://matchfwd-statics.s3-website-us-east-1.amazonaws.com/asset_cache/css/e1b34bd841d9.css" type="text/css" media="all">
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js'>
<script>
$(function() {
$("#dialog-form").dialog({
autoOpen: false,
height: 500,
width: 550,
modal: true,
buttons: {
"Send": function() {
$(this).dialog("close");
},
Cancel: function() {
$(this).dialog("close");
}
},
close: function() {
allFields.val("").removeClass("ui-state-error");
} });
$("#create-user") .button() .click(function() { $("#dialog-form").dialog("open"); });
});
</script>
<div class="demo">
<div id="dialog-form" title="Create new user">
<p class="validateTips">All form fields are required.</p>
<form class="main-form" method="post" action="" enctype="multipart/form-data">
<h3>Fill in some details</h3>
<span class="title">Your profile will be submitted with your application:</span><br/>
<div class="holder" style="position:relative;top:12px"><a style="color:#24c2c9;" href="></a></div>
<br>
<span class="title">Why would you be the right candidate?</span><br/>
<div class="holder"><textarea class="" name="description" cols="58" rows="10"> </textarea></div>
<span class="note"></span>
<span class="title">Attachments <a href="#" id="add_attachment" class="plus"> </a></span>
<div id="attachments" class="holder"></div>
</form>
</div>
<button id="create-user">Create new user</button>
<script type="text/javascript">
(function() {
var counter=1;
$("#add_attachment").click(function(e){
e.preventDefault();
var attachmentString = 'attachment-'+counter
var inputString = '<input type="file" name="'+attachmentString+'" id="id_'+attachmentString+'" />'
$(inputString).appendTo("#attachments")
counter = counter+1
})})();
</script>
如果您可以在受影响的区域以及脚本中显示代码,也许我们可以了解正在发生的事情。 – ace
感谢您的链接,试图打破一些与重度用户互动的js,但似乎并没有发生。如果这种情况发生在具有所有3个浏览器的单台计算机上,我们可能需要检查ajax请求会发生什么情况以打开对话框。此外,这只会发生在'apply'按钮上,或者也发生在'share'按钮上。 – ace
没有它发生在多台电脑上。一台配XP的旧P4,一台配Windows 7的新笔记本和一台配Kubuntu的上网本。但Ubuntu的情况很奇怪,因为家伙重新启动(为了一些不公开的原因),然后它正在工作....唯一的问题是,当点击应用弹出窗口中的附件时,你会得到一个文件对话框。在某些计算机上,文件对话框不会出现。 –