点击按钮没反应,代码:
js:
$(document).ready(function() {
$("#fileuploadify").uploadify({
'uploader' : '<s:url value="/download/uploadifyTest" />',
'swf' : '<%=path %>/images/uploadify.swf',
'buttonText': '选 择 文 件',
'auto' : true,
'multi' : true
})
});
html:
<input type="file" name="fileuploadify" id="fileuploadify"></input>
IE8浏览器,至少应该能弹出上传窗口来吧,折腾快一天了。。。
32 个解决方案
#1
有没有js错误?
#2
不提示任何错误的
#3
浏览器没有错误感叹号提示
#4
<a href="http://download.csdn.net/detail/jchuang2011/6506763"></a>
我写的一个uploadify插件Demo,添加了很多注释。可以借鉴下,不懂可以问我!
我写的一个uploadify插件Demo,添加了很多注释。可以借鉴下,不懂可以问我!
#6
请问这个demo可以在IE8中正常使用吗?
#8
都有引入的,都能在buttonText修改按钮的文本了,就是弹不出上传窗口。
#9
完全可以
只要导入eclipse或者myeclipse发布一下就能用
#10
绝对有错误,打开浏览器的错误控制台看看是什么错误
#11
你上传按钮不能用很可能是SWF路径不对
#12
用firebug看一下啊。估计是js错误
#13
'uploader' : '<s:url value="/download/uploadifyTest" />'
我用的时候不是这么写的,直接写路径
我用的时候不是这么写的,直接写路径
#14
你上传按钮不能用很可能是SWF路径不对
#15
自己写了个简单的html,其中引入相关css,js和swf文件,一个input type=file,
swf文件能载入了,鼠标指向按钮时会变成手形,但是点击仍然打不开。唉。
官方的demo在IE8和火狐里运行地很好,自己弄的就是不弹窗,也不报错,到底为啥呀。。。
相关文件都在html同目录下。
swf文件能载入了,鼠标指向按钮时会变成手形,但是点击仍然打不开。唉。
官方的demo在IE8和火狐里运行地很好,自己弄的就是不弹窗,也不报错,到底为啥呀。。。
$(function() {
$("#fileuploadify").uploadify({
height : 30,
swf : 'uploadify.swf',
uploader : '/uploadify/uploadify.php',
width : 120
});
});
<head>
<title>asdf</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="uploadify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="jQuery_v1.10.2.js"></script>
<script type="text/javascript" src="jquery.uploadify.js"></script>
</head>
<body>
<input type="file" name="fileuploadify" id="fileuploadify" />
</body>
相关文件都在html同目录下。
#16
自己写了个简单的html,其中引入相关css,js和swf文件,一个input type=file,
swf文件能载入了,鼠标指向按钮时会变成手形,但是点击仍然打不开。唉。
官方的demo在IE8和火狐里运行地很好,自己弄的就是不弹窗,也不报错,到底为啥呀。。。
$(function() {
$("#fileuploadify").uploadify({
height : 30,
swf : 'uploadify.swf',
uploader : '/uploadify/uploadify.php',
width : 120
});
});
<head>
<title>asdf</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="uploadify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="jQuery_v1.10.2.js"></script>
<script type="text/javascript" src="jquery.uploadify.js"></script>
</head>
<body>
<input type="file" name="fileuploadify" id="fileuploadify" />
</body>
相关文件都在html同目录下。
你少了一个div
<div id="fileQueue"></div>
#17
这个div是保存上传文件队列的
#18
这个div是保存上传文件队列的
#19
感谢各位的帮助。
#20
加到body里了,没起作用。
这个div是保存上传文件队列的
把你HTML完整的贴出来看看
#21
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>fileuploadify</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="uploadify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="jquery.uploadify-3.1.min.js"></script>
<script type="text/javascript">
jQuery(document).ready(function () {
$("#fileuploadify").uploadify({
'height' : 30,
'swf' : 'uploadify.swf',
'uploader : '/uploadify/uploadify.php',
'width' : 120,
'buttonText': 'Select Files',
'auto' : true,
'multi' : true
});
});
</script>
</head>
<body>
<input type="file" name="fileuploadify" id="fileuploadify" /><br/>
<div id="fileQueue"></div>
</body>
</html>
#22
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>fileuploadify</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="uploadify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="jquery.uploadify-3.1.min.js"></script>
<script type="text/javascript">
jQuery(document).ready(function () {
$("#fileuploadify").uploadify({
'height' : 30,
'swf' : 'uploadify.swf',
'uploader : '/uploadify/uploadify.php',
'width' : 120,
'buttonText': 'Select Files',
'auto' : true,
'multi' : true
});
});
</script>
</head>
<body>
<input type="file" name="fileuploadify" id="fileuploadify" /><br/>
<div id="fileQueue"></div>
</body>
</html>
貌似没什么错啊,你加我QQ314919271,把项目发我我帮你调调
#23
可以到我的博客查看一个uploadify实例演示,相信对你比较有帮助,你的按钮路径后面最好加个时间戳
#24
这是我的上传文件。
$(document).ready(function() {
$("#uploadify").uploadify({
'uploader' : '<%=request.getContextPath()%>/img/uploadify.swf',
'script' : '<%=request.getContextPath()%>/web/resFile/add',//后台处理的请求
'cancelImg' : '<%=request.getContextPath()%>/img/cancel.png',
'fileDataName':'uri',//服务器端根据这个接收文件
'queueID' : 'fileQueue',//与下面的id对应
'queueSizeLimit' : 30,
'fileDesc' : '图片文件',
'fileExt' : '*.png;*.jpg;*.gif;*.bmp', //控制可上传文件的扩展名,启用本项时需同时声明fileDesc
'auto' : false,
'multi' : true,
'simUploadLimit' : 2,
'buttonText' : 'BROWSE',
'onError' : function(event, queueID, fileObj, errorObj) {
alert(" 上传失败" + errorObj.info + "错误类型" + errorObj.type);
},
'onComplete' : function(event, queueID, fileObj, response, data) {
var msg = response;
if (msg != '') {
if (msg == "success") {
alert("操作成功!");
} else if (msg == "failed") {
alert("操作失败!");
} else if (msg = "exist") {
alert('该图片已存在!');
}
}
}
});
});
希望可以帮到你。
$(document).ready(function() {
$("#uploadify").uploadify({
'uploader' : '<%=request.getContextPath()%>/img/uploadify.swf',
'script' : '<%=request.getContextPath()%>/web/resFile/add',//后台处理的请求
'cancelImg' : '<%=request.getContextPath()%>/img/cancel.png',
'fileDataName':'uri',//服务器端根据这个接收文件
'queueID' : 'fileQueue',//与下面的id对应
'queueSizeLimit' : 30,
'fileDesc' : '图片文件',
'fileExt' : '*.png;*.jpg;*.gif;*.bmp', //控制可上传文件的扩展名,启用本项时需同时声明fileDesc
'auto' : false,
'multi' : true,
'simUploadLimit' : 2,
'buttonText' : 'BROWSE',
'onError' : function(event, queueID, fileObj, errorObj) {
alert(" 上传失败" + errorObj.info + "错误类型" + errorObj.type);
},
'onComplete' : function(event, queueID, fileObj, response, data) {
var msg = response;
if (msg != '') {
if (msg == "success") {
alert("操作成功!");
} else if (msg == "failed") {
alert("操作失败!");
} else if (msg = "exist") {
alert('该图片已存在!');
}
}
}
});
});
希望可以帮到你。
#25
我也是这个问题,LZ最后怎么解决的
#26
必须指定swf路径,否则无法正确加载swf.
如下:
$('#file_upload').uploadify({
'swf': 'JS/jquery.uploadify-v3.1/uploadify.swf', //FLash文件路径
如下:
$('#file_upload').uploadify({
'swf': 'JS/jquery.uploadify-v3.1/uploadify.swf', //FLash文件路径
#27
我也是这个问题 ,<a href="../uploadify/uploadify.swf">uploadify.swf</a> 能下载 打开一个空白页面,点页面能打开对话框。
页面源码就这么一行:
<embed width="100%" height="100%" src="http://localhost:2166/uploadify/uploadify.swf" type="application/x-shockwave-flash" fullscreen="yes"/>
我怀疑是JQUERY的版本问题,似乎是加载完flash调用JS做了什么处理,我用的是JQUERY1.83
页面源码就这么一行:
<embed width="100%" height="100%" src="http://localhost:2166/uploadify/uploadify.swf" type="application/x-shockwave-flash" fullscreen="yes"/>
我怀疑是JQUERY的版本问题,似乎是加载完flash调用JS做了什么处理,我用的是JQUERY1.83
#28
这个问题是怎么解决的 我也遇到这个问题了啊
#29
请问你最后解决了吗
#30
楼主解决了吗?
#31
我也是这个问题问下楼主怎么解决的?
#32
解决了吗 我也遇到这个问题了
#1
有没有js错误?
#2
不提示任何错误的
#3
有没有js错误?
#4
<a href="http://download.csdn.net/detail/jchuang2011/6506763"></a>
我写的一个uploadify插件Demo,添加了很多注释。可以借鉴下,不懂可以问我!
我写的一个uploadify插件Demo,添加了很多注释。可以借鉴下,不懂可以问我!
#5
uploadify的flash_Java版本Demo
我写的一个uploadify插件Demo,添加了很多注释。可以借鉴下,不懂可以问我!
我写的一个uploadify插件Demo,添加了很多注释。可以借鉴下,不懂可以问我!
#6
<a href="http://download.csdn.net/detail/jchuang2011/6506763"></a>
我写的一个uploadify插件Demo,添加了很多注释。可以借鉴下,不懂可以问我!
#7
脚本文件都有引入么
http://www.cnblogs.com/oec2003/archive/2010/01/06/1640027.html虽然不知道什么问题 但可以参考一下这个
http://www.cnblogs.com/oec2003/archive/2010/01/06/1640027.html虽然不知道什么问题 但可以参考一下这个
#8
脚本文件都有引入么
http://www.cnblogs.com/oec2003/archive/2010/01/06/1640027.html虽然不知道什么问题 但可以参考一下这个
#9
请问这个demo可以在IE8中正常使用吗?
<a href="http://download.csdn.net/detail/jchuang2011/6506763"></a>
我写的一个uploadify插件Demo,添加了很多注释。可以借鉴下,不懂可以问我!
完全可以
只要导入eclipse或者myeclipse发布一下就能用
#10
绝对有错误,打开浏览器的错误控制台看看是什么错误
#11
你上传按钮不能用很可能是SWF路径不对
#12
用firebug看一下啊。估计是js错误
#13
'uploader' : '<s:url value="/download/uploadifyTest" />'
我用的时候不是这么写的,直接写路径
我用的时候不是这么写的,直接写路径
#14
你上传按钮不能用很可能是SWF路径不对
#15
自己写了个简单的html,其中引入相关css,js和swf文件,一个input type=file,
swf文件能载入了,鼠标指向按钮时会变成手形,但是点击仍然打不开。唉。
官方的demo在IE8和火狐里运行地很好,自己弄的就是不弹窗,也不报错,到底为啥呀。。。
相关文件都在html同目录下。
swf文件能载入了,鼠标指向按钮时会变成手形,但是点击仍然打不开。唉。
官方的demo在IE8和火狐里运行地很好,自己弄的就是不弹窗,也不报错,到底为啥呀。。。
$(function() {
$("#fileuploadify").uploadify({
height : 30,
swf : 'uploadify.swf',
uploader : '/uploadify/uploadify.php',
width : 120
});
});
<head>
<title>asdf</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="uploadify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="jQuery_v1.10.2.js"></script>
<script type="text/javascript" src="jquery.uploadify.js"></script>
</head>
<body>
<input type="file" name="fileuploadify" id="fileuploadify" />
</body>
相关文件都在html同目录下。
#16
自己写了个简单的html,其中引入相关css,js和swf文件,一个input type=file,
swf文件能载入了,鼠标指向按钮时会变成手形,但是点击仍然打不开。唉。
官方的demo在IE8和火狐里运行地很好,自己弄的就是不弹窗,也不报错,到底为啥呀。。。
$(function() {
$("#fileuploadify").uploadify({
height : 30,
swf : 'uploadify.swf',
uploader : '/uploadify/uploadify.php',
width : 120
});
});
<head>
<title>asdf</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="uploadify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="jQuery_v1.10.2.js"></script>
<script type="text/javascript" src="jquery.uploadify.js"></script>
</head>
<body>
<input type="file" name="fileuploadify" id="fileuploadify" />
</body>
相关文件都在html同目录下。
你少了一个div
<div id="fileQueue"></div>
#17
这个div是保存上传文件队列的
#18
这个div是保存上传文件队列的
#19
感谢各位的帮助。
#20
加到body里了,没起作用。
这个div是保存上传文件队列的
把你HTML完整的贴出来看看
#21
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>fileuploadify</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="uploadify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="jquery.uploadify-3.1.min.js"></script>
<script type="text/javascript">
jQuery(document).ready(function () {
$("#fileuploadify").uploadify({
'height' : 30,
'swf' : 'uploadify.swf',
'uploader : '/uploadify/uploadify.php',
'width' : 120,
'buttonText': 'Select Files',
'auto' : true,
'multi' : true
});
});
</script>
</head>
<body>
<input type="file" name="fileuploadify" id="fileuploadify" /><br/>
<div id="fileQueue"></div>
</body>
</html>
#22
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>fileuploadify</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="uploadify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="jquery.uploadify-3.1.min.js"></script>
<script type="text/javascript">
jQuery(document).ready(function () {
$("#fileuploadify").uploadify({
'height' : 30,
'swf' : 'uploadify.swf',
'uploader : '/uploadify/uploadify.php',
'width' : 120,
'buttonText': 'Select Files',
'auto' : true,
'multi' : true
});
});
</script>
</head>
<body>
<input type="file" name="fileuploadify" id="fileuploadify" /><br/>
<div id="fileQueue"></div>
</body>
</html>
貌似没什么错啊,你加我QQ314919271,把项目发我我帮你调调
#23
可以到我的博客查看一个uploadify实例演示,相信对你比较有帮助,你的按钮路径后面最好加个时间戳
#24
这是我的上传文件。
$(document).ready(function() {
$("#uploadify").uploadify({
'uploader' : '<%=request.getContextPath()%>/img/uploadify.swf',
'script' : '<%=request.getContextPath()%>/web/resFile/add',//后台处理的请求
'cancelImg' : '<%=request.getContextPath()%>/img/cancel.png',
'fileDataName':'uri',//服务器端根据这个接收文件
'queueID' : 'fileQueue',//与下面的id对应
'queueSizeLimit' : 30,
'fileDesc' : '图片文件',
'fileExt' : '*.png;*.jpg;*.gif;*.bmp', //控制可上传文件的扩展名,启用本项时需同时声明fileDesc
'auto' : false,
'multi' : true,
'simUploadLimit' : 2,
'buttonText' : 'BROWSE',
'onError' : function(event, queueID, fileObj, errorObj) {
alert(" 上传失败" + errorObj.info + "错误类型" + errorObj.type);
},
'onComplete' : function(event, queueID, fileObj, response, data) {
var msg = response;
if (msg != '') {
if (msg == "success") {
alert("操作成功!");
} else if (msg == "failed") {
alert("操作失败!");
} else if (msg = "exist") {
alert('该图片已存在!');
}
}
}
});
});
希望可以帮到你。
$(document).ready(function() {
$("#uploadify").uploadify({
'uploader' : '<%=request.getContextPath()%>/img/uploadify.swf',
'script' : '<%=request.getContextPath()%>/web/resFile/add',//后台处理的请求
'cancelImg' : '<%=request.getContextPath()%>/img/cancel.png',
'fileDataName':'uri',//服务器端根据这个接收文件
'queueID' : 'fileQueue',//与下面的id对应
'queueSizeLimit' : 30,
'fileDesc' : '图片文件',
'fileExt' : '*.png;*.jpg;*.gif;*.bmp', //控制可上传文件的扩展名,启用本项时需同时声明fileDesc
'auto' : false,
'multi' : true,
'simUploadLimit' : 2,
'buttonText' : 'BROWSE',
'onError' : function(event, queueID, fileObj, errorObj) {
alert(" 上传失败" + errorObj.info + "错误类型" + errorObj.type);
},
'onComplete' : function(event, queueID, fileObj, response, data) {
var msg = response;
if (msg != '') {
if (msg == "success") {
alert("操作成功!");
} else if (msg == "failed") {
alert("操作失败!");
} else if (msg = "exist") {
alert('该图片已存在!');
}
}
}
});
});
希望可以帮到你。
#25
我也是这个问题,LZ最后怎么解决的
#26
必须指定swf路径,否则无法正确加载swf.
如下:
$('#file_upload').uploadify({
'swf': 'JS/jquery.uploadify-v3.1/uploadify.swf', //FLash文件路径
如下:
$('#file_upload').uploadify({
'swf': 'JS/jquery.uploadify-v3.1/uploadify.swf', //FLash文件路径
#27
我也是这个问题 ,<a href="../uploadify/uploadify.swf">uploadify.swf</a> 能下载 打开一个空白页面,点页面能打开对话框。
页面源码就这么一行:
<embed width="100%" height="100%" src="http://localhost:2166/uploadify/uploadify.swf" type="application/x-shockwave-flash" fullscreen="yes"/>
我怀疑是JQUERY的版本问题,似乎是加载完flash调用JS做了什么处理,我用的是JQUERY1.83
页面源码就这么一行:
<embed width="100%" height="100%" src="http://localhost:2166/uploadify/uploadify.swf" type="application/x-shockwave-flash" fullscreen="yes"/>
我怀疑是JQUERY的版本问题,似乎是加载完flash调用JS做了什么处理,我用的是JQUERY1.83
#28
这个问题是怎么解决的 我也遇到这个问题了啊
#29
请问你最后解决了吗
#30
楼主解决了吗?
#31
我也是这个问题问下楼主怎么解决的?
#32
解决了吗 我也遇到这个问题了