- 注册时间
- 2013-7-8
- 最后登录
- 2019-1-9
- 阅读权限
- 10
- 积分
- 103
- 精华
- 0
- 帖子
- 24
|
父页面:放主grid,有个方法abc();用来新增返回的数据
子页面:放子grid
子页面通过window.Owner.abc(参数:子grid.getSelected());来调用abc()方法,新增数据。
问题:数据显示不到父页面的grid;在ie下总是alert一个窗口,上面显示 0 undefined ;在火狐下显示 datagrid json is error;
//父页面函数
function addMealInfo(data) {
alert(data);
grid.setData(data);
}
//子页面函数
function addInfo() {
var rows = grid.getSelecteds();
var json = mini.encode(rows);
//var date = [{"itemid":"1222","fwflid": "社区服务","sqfwxmflid": "家政服务","fwnrmc": "家庭护理","fwdj": "15","fwzdj": "15","sflxid": "计件标准类型","ckfwsj": "30-45分钟/次","fwfw": "街镇项目","yxx": "是","lsjgbm": "310115","fwcs": "10","fwje": "150","checkperson":""}];
window.Owner.addMealInfo(date);
window.CloseOwnerWindow();
}
|
|