rms 文件上传
来源:互联网 发布:大数据pdf微盘 编辑:程序博客网 时间:2024/06/16 22:54
<tr>
<th>弹出方式</th>
<td><selectname="urltarget"class="easyui-combobox"data-options="panelHeight:'auto'">
<optionvalue="">请选择弹出方式</option>
<optionvalue="_self">当前页面</option>
<optionvalue="_blank">弹出页面</option>
</select></td>
</tr>
//绑定上传按钮功能
$(".uploader").on('click', uploaderFun);
//先对所有uploader的class对象进行遍历
$(".uploader")
.each(function () {
var selectObj = $(this)
.prev('.selectFiles');
var options = "";
//如果该文件选择器有值,则进行异步数据获取
if ($(this)
.next('.selectFilesValue')
.val()
.trim()
.length != 0) {
var ids = $(this)
.next('.selectFilesValue')
.val();
$.ajax({
type: "POST",
url: ctx + "findSysUploadByIds.do",
data: {
ids: ids
}
})
.done(function (result) {
result = JSON.parse(result);
if (result.length > 0) {
//对返回结果进行遍历,重组option选项,并将结果放置到相应的selectOption对象中去
$(result)
.each(function () {
options += "<option>" +this.clientName + "</option>";
})
selectObj.html(options);
selectObj.prepend("<option>选择文件(选中了 " + result.length +" 个)</option>");
}
})
} else {
selectObj.html("<option>选择文件</option>");
}
});
//选择文件部分的函数操作,需要将自身对象及ids列表作为参数进行传递
function uploaderFun() {
var btn = $(this);
var ids = "";
if ($(this)
.next()
.val()
.trim()
.length != 0) {
ids = "?ids=" + $(this)
.next()
.val();
}
if (ids.length > 0) {
url = '../../uploader.jsp' + ids +'&moduleId=article&funcId=article&dataId=' + scId;
} else {
url = '../../uploader.jsp?moduleId=article&funcId=article&dataId=' + scId;
}
var dialog = fw.modalDialog({
title: '选择文件',
url: url,
width: 700,
height: 500,
buttons: [{
text: '确认选择',
handler: function () {
dialog.find('iframe')
.get(0)
.contentWindow.submitForm(dialog, btn);
}
}, {
text: '清除文件',
handler: function () {
dialog.find('iframe')
.get(0)
.contentWindow.clearSelectedFiles(dialog, btn);
}
}, {
text: '关闭窗口',
handler: function () {
dialog.find('iframe')
.get(0)
.contentWindow.closeDialog(dialog);
}
}]
});
}
- rms 文件上传
- J2ME 文件上传 实例(FileConnector链接文件系统,非RMS)
- J2me文件上传实例(Use Fileconnector not rms)转来的
- 文件上传---文件上传
- RMS forum
- J2ME RMS
- JavaME RMS
- RMS部署
- RMS Error
- RMS配置
- 什么是 RMS
- RMS计算方法
- 上传文件
- 文件上传
- 上传文件
- 文件上传
- 文件上传
- 上传文件
- linux常见命令用法之(一)
- OutputCache多个域名下会记录相同页面问题
- Vim自动补全神器:YouCompleteMe
- 数据结构(Java)——二叉树的应用
- AsyncTask异步机制
- rms 文件上传
- android Notification 的使用
- Fragment与Activity之间传值
- 为什么要跟新数据库(SQList)
- 更改Eclipse下Tomcat的部署目录
- Codeforces Round332 部分题解
- 053-9 To view the results of a manual SQL Tuning Advisor task, which steps should the DBA take?
- Dynamics CRM2013 流程拷贝
- 乐观锁与悲观锁