Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Can't get the xml from my webserver
03/07/2008
20:59
Avatar
murdoc
Member
Members
Forum Posts: 23
Member Since:
27/06/2008
sp_UserOfflineSmall Offline

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”

});

05/07/2008
03:05
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
24 Guest(s)

Currently Browsing this Page:
1 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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information