uploadify 之.updateSettings is not a function处理方法
来源:互联网 发布:小说录音软件 编辑:程序博客网 时间:2024/05/16 05:11
使用uploadify动态修改参数的方法。
$('[id$="txtTitle"]').change(function() {
theString = $(this).val();
$('[id$="fileInput"]').uploadifySettings('scriptData', { 'id': id, 'productname': theString, 'path': path, 'isreduce': isreduce });
});
是总是抛出“updateSettings is not a function”的错误。
经翻阅资料,发现了问题所在,描述如下:
如果浏览按钮没有显示的时候,调用动态更新参数的方法uploadifySettings就会报此错误。
例子:
<div style="display:none;">
<input type="file" name="uploadify" id="uploadify" />
</div>
说明: 浏览按钮被包裹在一个隐藏(style="display:none;")的div中。这种时候调用uploadifySettings就会报错。
解决:只要将style="display:none" 改成style="display:block"就行了,要达到页面启动时隐藏浏览按钮可用Jquery实现。
在页面个radio如下。:
<input type="radio" value="1" name="switchor" id="Selected1" checked ="checked" >
<input type="radio" value="0" name="switchor" id="Selected2" >
divSinglephoto下面放上传控件.
divNophoto下面放一个默认图片.
刚开始时显示默认图片,单击selected1时显示上传的浏览按钮.
$(document).ready(function() {
$("[id$='rblpic']").click(function() {
if ($("input:radio[name$='rblpic']:checked").val() == "1") {
$('#divSinglephoto').show();
$('#divNophoto').hide();
}
else {
$('#divSinglephoto').hide();
$('#divNophoto').show();
}
});
$("[id$='rblpic']").attr("checked","0");
$('#divSinglephoto').hide();
)};
- uploadify 之.updateSettings is not a function处理方法
- JavaScript replace() 方法 之 var.replace is not a function
- $ is not a function
- $ is not a function
- is not a function
- 报错:Uncaught TypeError: $(…).dialog is not a function,处理方法。
- $(...).niceScroll is not a function; $... is not a function
- object is not a function
- RVM is not a function
- $(...).scrollpic is not a function
- javascript *** is not a function
- $(...).live is not a function
- $(...).niceScroll is not a function
- $(...).live is not a function
- $(...).modal is not a function
- $(...).modal is not a function
- toFixed() is not a function
- $.handleError is not a function
- sed 命令的用法
- FLEX Array和ArrayCollection的区别
- OPHONE获得USER AGENT[权威解决方案]
- Linux下文本文件中^M 符号问题的解决
- CommandText的研究
- uploadify 之.updateSettings is not a function处理方法
- java -cp 命令使用
- automake与makefile.am变量详细解释
- 路由器和交换机配置命令讲解与演示视频教程
- fopen_s
- 如何看懂源代码--(分析源代码方法)
- JAVA动态代理实现的小例子
- J2ME移动开发实战教学视频
- libtool的作用及应用[转载]