Forum


20:59

27/06/2008

I have a web server set up and running on my machine, and I can post an XML document to the server and process the response from the server(which are also another XML document).
I enter the address as “server ip:13310/stat/tasks”, minus the quotes,and 13310 is the porter number.then I can get the XML data in browser.
but When I use the “jqgrid”,I can't perform the XML data to the grid with the following code.
=====================================
jQuery(”#list19″).jqGrid({
url: 'http://127.0.0.1:13310/stat/ta.....s',
datatype: “xml”,
colNames:["TASK_ID","START_TIME", "END_TIME", "ENABLE","DESC","STATUS"],
colModel:[
{name:"TASK_ID",index:"ID", width:80, xmlmap:"TASK_ID"},
{name:"TASK_START_TIME",index:"START_TIME", width:180,align:"right",xmlmap:"TASK_START_TIME",sorttype:"date"},
{name:"TASK_END_TIME",index:"END_TIME", width:180, align:"right",xmlmap:"TASK_END_TIME", sorttype:"date"},
{name:"TASK_ENABLE",index:"ENABLE", width:130,xmlmap:"TASK_ENABLE"},
{name:"TASK_DESC",index:"DESC", width:100, xmlmap:"TASK_DESC"},
{name:"TASK_STATUS",index:"STATUS", width:100, xmlmap:"TASK_STATUS"}
],
height:250,
rowNum:10,
rowList:[10,20,30],
imgpath: gridimgpath,
viewrecords: true,
loadonce: true,
xmlReader: {
root : “TaskList”,
row: “Task”,
repeatitems: false,
id: “TASK_ID”
},
caption: “TASK LIST”
});
==================================
but I put the XML document on my own localdisk,the program workwell,the code like this.
===================================
jQuery(”#list19″).jqGrid({
url: 'tasks.xml',
datatype: “xml”,
colNames:["TASK_ID","START_TIME", "END_TIME", "ENABLE","DESC","STATUS"],
colModel:[
{name:"TASK_ID",index:"ID", width:80, xmlmap:"TASK_ID"},
{name:"TASK_START_TIME",index:"START_TIME", width:180,align:"right",xmlmap:"TASK_START_TIME",sorttype:"date"},
{name:"TASK_END_TIME",index:"END_TIME", width:180, align:"right",xmlmap:"TASK_END_TIME", sorttype:"date"},
{name:"TASK_ENABLE",index:"ENABLE", width:130,xmlmap:"TASK_ENABLE"},
{name:"TASK_DESC",index:"DESC", width:100, xmlmap:"TASK_DESC"},
{name:"TASK_STATUS",index:"STATUS", width:100, xmlmap:"TASK_STATUS"}
],
height:250,
rowNum:10,
rowList:[10,20,30],
imgpath: gridimgpath,
viewrecords: true,
loadonce: true,
xmlReader: {
root : “TaskList”,
row: “Task”,
repeatitems: false,
id: “TASK_ID”
},
caption: “TASK LIST”
});
03:05

Moderators
30/10/2007

Use loadError(xhr,st,err) event to determine if you have error from
the server. More information you can find in this forum in topic Releases
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
55 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66