- 注册时间
- 2014-6-12
- 最后登录
- 2015-8-28
- 阅读权限
- 10
- 积分
- 194
- 精华
- 0
- 帖子
- 25

|
felt 发表于 2014-7-23 11:41 
你保存和上传写在什么事件里的
你js调用的时候没触发方法吧
点击新增的代码- function addAttachment(){
- var o = form.getData();
- var json = mini.encode(o);
- mini.open({
- url: "__URL__/addFile",
- title: "增加附件", width:450, height:300,
- onload: function () {
- var iframe = this.getIFrameEl();
- var data = { id: json};
- iframe.contentWindow.SetData(data);
- },
- ondestroy: function(){
- grid.reload();
- }
- });
- }
复制代码 新增页面点击上传的代码- function uploads(){
- var form1 = document.getElementById("myForm1");
- var tagElements = form1.getElementsByTagName('input');
- for(var i =0;i<tagElements.length;i++){
- if(tagElements[i].value == "" || tagElements[i].value ==null){
- alert("请正确选择要上传的文件!");
- return ;
- }
- }
- document.myForm1.action="__URL__/upload/?id="+correctNo;
- document.myForm1.submit();
- alert('上传成功');
- // window.CloseOwnerWindow('save');
- }
复制代码 |
|