<script type="text/javascript" language="JavaScript">
$(document).ready(function(){
$.ajax({
type: "POST",
url: "/pcc/data/ajaxProtocolOrg.action",
data: {
stamp: stamp
},
error: function(XMLHttpRequest, textStatus, errorThrown){
alert('error');
},
success: function(data){
$("#test").text(data);
$("#flex").flexigrid({
url:"/pcc/data/ajaxProtocolOrg.action",
dataType:"json",
colModel:[
{display: 'ID', name : 'id', width : 80, sortable : true, align: 'center'},
{display: 'NAME', name : 'name', width : 120, sortable : true, align: 'center'},
{display: 'REMARK', name : 're', width : 120, sortable : true, align: 'center'},
{display: 'STATUS', name : 'status', width : 120, sortable : true, align: 'center'}
],
title:"协议组织管理",
width : "800",
height : "600"
});
}
});
});
</script>前台页面显示json为[{"id":1,"name":"test1","re":"test1","status":0}]
但是flexigrid中表头出来了,就是数据出不来..而且ie报脚本错误,网页错误详细信息用户代理: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)
时间戳: Fri, 24 Jun 2011 03:31:00 UTC
消息: 'length' 为空或不是对象
行: 1176
字符: 20
代码: 0
URI: http://localhost:8080/pcc/js/jquery-1.3.2.js