我有一个 jquery-ui-dialog ,<form>
其中包含一个<input type=file
>
对于我的一些用户,当他们单击按钮打开文件对话框时:它没有出现。
该问题不是基于浏览器的,因为有此问题的计算机能够使用所有已安装的浏览器重现它:
- 铬合金
- 火狐
- IE浏览器
该问题不是基于操作系统的,因为我已经看到出现以下问题:
- 视窗XP
- Windows 7的
- 库本图 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>