Попробывал поюзать jqGrid, но данные почему-то не грузятся
вот страница на которой jqGrid
Код:
|
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8" />
<title>Admin</title>
<script type='text/javascript' src="/application/views/js/jquery-1.8.1.js"></script>
<link rel="stylesheet" type="text/css" media="screen" href="/application/views/js/jquery.jqgrid/css/ui-lightness/jquery-ui-1.8.23.custom.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/application/views/js/jquery.jqgrid/css/ui.jqgrid.css" />
<script type="text/javascript"src="/application/views/js/jquery.jqgrid/js/i18n/grid.locale-ru.js"></script>
<script type="text/javascript"src="/application/views/js/jquery.jqgrid/js/jquery.jqGrid.min.js"></script>
</head>
<body>
<script type="text/javascript">
$(document).ready(function () {
$("#refresh").click(function () {
$("#list2").jqGrid({
url: "http://exam/json/channel/main/df.php",
datatype: "json",
colNames:['IDn', 'RusName', 'EngName'],
colModel:[
{name:'id',index:'id', width:55}
,{name:'rusname',index:'rusname', width:90}
,{name:'engname',index:'engname', width:100}
],
rowNum:10,
rowList:[10,20,30],
pager: '#pager2',
//sortname: 'id',
viewrecords: true,
//sortorder: "desc",
caption:"JSON Example"
});
$("#list2").jqGrid('navGrid','#pager2',{edit:false,add:false,del:false});
});
});
</script>
<div id="jqxgrid">
</div>
<button id="refresh">Refresh Data</button>
<button id="clear" >Clear</button>
<div id='jqxWidget2' style="font-size: 13px; font-family: Verdana; float: left;">
<div style="margin-top: 10px;">
</div>
</div>
<div>
<table id="list2"></table>
<div id="pager2"></div>
</div>
<div id='footer'>
This is footer <br/>
Copyright ©: ByMe
</div>
</body>
</html>
|
ссылка
http://exam/json/channel/main/df.php выдает:
[{"id":1,"engname":"sergey","rusname":"vlad"},{"id" :2,"engname":"andrey","rusname ":"vladik"}]
вот запрос и ответ:
Request URL:
http://exam/json/channel/main/df.php...d=asc&filters=
Request Method:GET
Status Code:200 OK
Request Headersview parsed
GET /json/channel/main/df.php?_search=false&nd=1347049343454&rows=10&page =1&sidx=&sord=asc&filters= HTTP/1.1
Host: exam
Connection: keep-alive
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.89 Safari/537.1
Accept: application/json, text/javascript, */*; q=0.01
Referer:
http://exam/admin/channels
Accept-Encoding: gzip,deflate,sdch
Accept-Language: ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4
Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.3
Query String Parametersview URL encoded
_search:false
nd:1347049343454
rows:10
page:1
sidx:
sord:asc
filters:
Response Headersview parsed
HTTP/1.1 200 OK
Date: Fri, 07 Sep 2012 20:22:23 GMT
Server: Apache/2.2.21 (Win32) PHP/5.4.0
X-Powered-By: PHP/5.4.0
Content-Length: 93
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: application/json; charset=UTF-8
подскажите, в чем может быть проблемка?