Hi Mike, I am a web2py newbie and has to learn much from experts like you. I would like to know which of the following url format you are using to access your xml data in your server:
1. url: "{{=URL(r=request,c='default',f='getjsdata')}}", 2. url: '/EMIS/controllers/getjsdata.py', Is it 1 or 2? Is it possible if you can email a source code of an application using web2py and jqGrid, I understand you are using jqGrid. I am also very interested to use jqGrid in web2py but not much documentation. I think you can provide the much needed example on this for everyone interested in this technology. Thanks in advance. Ed On 24 Mar, 01:36, Mike <michael.mcgreg...@gmail.com> wrote: > Hey Ed, > > We're using jqGrid with XML data. Something thoughts (if you haven't > tried them already): > > 1.) Try your grid with the FireBug plugin for FireFox and look at the > response being returned to the grid. I've had web2py tickets thown at > that point and the only to see it is via Firebug. Or just check for > tickets from the admin app > > 2.) Did you set the response headers? in my case I had to > use...response.headers["Content-Type"]="text/xml" > > 3.) What does your controller look like? In my controller that serves > up the XML I just return a string with the XML data "return xml" > instead of "return dict(xml = xml)" > > Hope that helps. I like jqGrid since it has excellent documentation > and hope more of us can make it work with web2py. > > Mike > > On Mar 23, 5:27 am, ed <edbi...@rocketmail.com> wrote: > > > Hi, > > I've been trying to execute a jquery jqGrid url to return JSON data > > but failed. Only a blank table with exact headings is displayed. I > > tried changing the url several times but no data is displayed. The > > following is part of the code. > > ------------------------------------------------------------------------------------------------------ > > > <script src="{{=URL(r=request,c='static',f='jqGrid34/jquery.js')}}" > > type="text/javascript"></script> > > <!-- and at end the jqGrid Java Script file --> > > <script src="{{=URL(r=request,c='static',f='jqGrid34/ > > jquery.jqGrid.js')}}" type="text/javascript"></script> > > <script type="text/javascript"> > > jQuery(document).ready(function(){ > > jQuery('#list2').jqGrid({ > > // > > // this is the url I am using but failed to display data > > > url: "{{=URL(r=request,c='default',f='getjsdata')}}", > > > // I created a program in controllers to return json data and > > tried the url below to access the program but also failed to display > > data > > url: '/EMIS/controllers/getjsdata.py', > > // > > datatype: 'json', > > colNames:['Emp. No.','Last Name', 'First Name', 'Mid Name', 'Cost > > Center', 'SSS No.'], > > colModel:[ > > {name:'empno',index:'empno', width:80}, > > {name:'lname',index:'lname', width:160}, > > ------------------------------------------------------------------------ > > Maybe the url address format is wrong or whatever. Can someone help me > > on this. > > Thank you very much. > > Ed --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---