easyuidatagrid onClickCell 函数中做页面跳转问题

高岛小雯 2014-11-12 05:21:30
$.getJSON("json/get/s_sushe_xinxi.json",{"buildingid":buildingid},function(data){
var options={
data:data,
width:'650px',
height:'300px',
toolbar:'#tb',
singleSelect:false,
checkOnSelect:true,
selectOnCheck: true,
pagination:true,
pageNumber:1,
pageSize:5,
pageList:[3,5,7],

onClickCell:function(rowIndex, field, value){
susheid=value.substring(0,6);
if(susheid.indexOf("层")>=0){}
else{
contains=parseInt(value[12]);
person=parseInt(value[10]);

$("#base_right").empty().load("super/s_ruzhu_xinxi.html");
}

}
}
var s="[[";
s+="{field:'ck',checkbox:true,rowspan:2},{field:'floorid',title:'楼层',width:50,align:'center',rowspan:2},";
s+="{title:'寝室号',align:'center',colspan:"+data.columnmax+"}],[";
for(i=1;i<data.columnmax;i++){
s+="{field:'" +i+"',title:'"+i+"',width:'50',align:'center',styler:cellStyler},";
}
s+="{field:'" +data.columnmax+"',title:'"+data.columnmax+"',align:'center',styler:cellStyler}]]";

options.columns=eval(s);
options.nowrap=false;
$('#dormitory').datagrid(options);
$('#dormitory').datagrid('reload');
});
报错为:
TypeError: _636 is undefined,是jquery.js里的
试了好久发现不管load那个页面都会报这个错,求大神帮忙。
...全文
329 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
高岛小雯 2014-11-24
  • 打赏
  • 举报
回复
终于解决了,$("#base_right").empty().load("super/s_ruzhu_xinxi.html");是这句的错,改为$("#base_right").load("super/s_ruzhu_xinxi.html");就好了。
高岛小雯 2014-11-13
  • 打赏
  • 举报
回复
alert执行了,改成了charAt 还是没有作用,报一样的错。大神,再帮我想想吧,初学者,真的是没办法了。
  • 打赏
  • 举报
回复
alert($("#base_right").size())
$("#base_right").empty().load("super/s_ruzhu_xinxi.html");

看执行了没有。。不一定是这个报错,IE8-字符串不支持用[]去字符

contains=parseInt(value[12]);
person=parseInt(value[10]);
=>
contains=value.charAt(12);
person=value.charAt(10);

87,997

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧