Note that there are some explanatory texts on larger screens.

plurals
  1. POjqgrid not loading data in server acugis but locally all works perfect
    primarykey
    data
    text
    <p>Hello I am having troubles with my jqgrid, my jqgrid loads an xml file locally(locally all works ), but in the server does not load anything, I tried with every code I found on the internet but I dont know why It is not loading the data in the grid, the jqgrid always shows a message that says Loading... and I wait some time, and then It stopped and does not load anything, can someone help?? locally works but in the server acugis not, please help </p> <p>this is my code:</p> <pre><code>$("#listaRedCuidadana").jqGrid({ treeGrid: true, treeGridModel : 'adjacency', ExpandColumn : 'distrito', url: '../../red_ciudadana/controller/controllerMostrarRedCuidadana.php', treeReader: { level_field: 'level', parent_id_field: 'parent_id', leaf_field: 'isLeaf', expanded_field: 'expanded' }, datatype: "xml", mtype: "POST", colNames:["id_ciudadano","Distrito","Seccion","Rol","Clave Electoral","Nombre","Apellido Paterno","Apellido Materno"], colModel:[ {name:'id_ciudadano',index:'id_ciudadano', width:1,hidden:true,key:true}, {name:'distrito',index:'distrito',align:"left"}, {name:'seccion',index:'seccion', width:60,align:"center"}, {name:'rol',index:'rol', width:150,align:"left"}, {name:'clave_electoral',index:'clave_electoral', width:150,align:"center"}, {name:'nombre',index:'nombre', width:100,align:"left"}, {name:'apaterno',index:'apaterno', width:100,align:"left"}, {name:'amaterno',index:'amaterno', width:100,align:"left"} ], width:'916', /*autowidth:true,*/ height:'auto', pager: '#pager', caption:"COORDINADORES DISTRITALES", onSelectRow: function(id){ var clv=$('#listaRedCuidadana').jqGrid('getCell',id,4); mostrarDetallesCuidadano(clv); initMapa(); } }); $("#listaRedCuidadana").jqGrid('navGrid',"#pager",{edit:false,add:false,del:false}); </code></pre> <p>and my .php file</p> <pre><code>&lt;?php require_once '../../sesion/model/clsSesion.php'; require_once '../../red_ciudadana/model/modelRedCuidadana.php'; if ( stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml") ) { header("Content-type: application/xhtml+xml;charset=utf-8"); } else { header("Content-type: text/xml;charset=utf-8"); } if(isset($_REQUEST['nodeid'])==FALSE) { $node =0; } else{ $node = (integer)$_REQUEST["nodeid"]; } $clsJqGrid = new redCuidadana(); $et = "&gt;"; echo "&lt;?xml version='1.0' encoding='utf-8'?$et\n"; echo "&lt;rows&gt;"; echo "&lt;page&gt;1&lt;/page&gt;"; echo "&lt;total&gt;1&lt;/total&gt;"; echo "&lt;records&gt;1&lt;/records&gt;"; if($node &gt;0) { //check to see which node to load $wh = 'parent_id='.$node; // parents //$n_lvl = $n_lvl+1; // we should ouput next level } else { //$wh = 'ISNULL(parent_id)'; $wh ='parent_id=0';// roots } $mostrarRegistros= $clsJqGrid-&gt;mostrarRegistros($wh); foreach ($mostrarRegistros as $row){ echo "&lt;row&gt;"; echo "&lt;cell&gt;".$row["id_ciudadano"]."&lt;/cell&gt;"; echo "&lt;cell&gt;".$row["distrito"]."&lt;/cell&gt;"; echo "&lt;cell&gt;".$row["seccion"]."&lt;/cell&gt;"; echo "&lt;cell&gt;".$row["rol"]."&lt;/cell&gt;"; echo "&lt;cell&gt;".$row["clave_electoral"]."&lt;/cell&gt;"; echo "&lt;cell&gt;".$row["nombre"]."&lt;/cell&gt;"; echo "&lt;cell&gt;".$row["apaterno"]."&lt;/cell&gt;"; echo "&lt;cell&gt;".$row["amaterno"]."&lt;/cell&gt;"; echo "&lt;cell&gt;".$row["level"]."&lt;/cell&gt;"; echo "&lt;cell&gt;&lt;![CDATA[".$row["parent_id"]."]]&gt;&lt;/cell&gt;"; if($row["level"] == "2"){echo "&lt;cell&gt;"."true"."&lt;/cell&gt;";} else{echo "&lt;cell&gt;".$row["isLeaf"]."&lt;/cell&gt;";} echo "&lt;cell&gt;".$row["expanded"]."&lt;/cell&gt;"; echo "&lt;/row&gt;"; } echo "&lt;/rows&gt;"; ?&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload