Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8377687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:44:05+00:00 2026-06-09T15:44:05+00:00

Hello I am having troubles with my jqgrid, my jqgrid loads an xml file

  • 0

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

this is my 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});

and my .php file

<?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 = ">";
echo "<?xml version='1.0' encoding='utf-8'?$et\n";
echo "<rows>";
echo "<page>1</page>";
echo "<total>1</total>";
echo "<records>1</records>";

if($node >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->mostrarRegistros($wh);
foreach ($mostrarRegistros as $row){
   echo "<row>";         
   echo "<cell>".$row["id_ciudadano"]."</cell>";
   echo "<cell>".$row["distrito"]."</cell>";
   echo "<cell>".$row["seccion"]."</cell>";
   echo "<cell>".$row["rol"]."</cell>";
   echo "<cell>".$row["clave_electoral"]."</cell>";
   echo "<cell>".$row["nombre"]."</cell>";
   echo "<cell>".$row["apaterno"]."</cell>";
   echo "<cell>".$row["amaterno"]."</cell>";
   echo "<cell>".$row["level"]."</cell>";
   echo "<cell><![CDATA[".$row["parent_id"]."]]></cell>";
   if($row["level"] == "2"){echo "<cell>"."true"."</cell>";}
   else{echo "<cell>".$row["isLeaf"]."</cell>";}
   echo "<cell>".$row["expanded"]."</cell>";
   echo "</row>";
}
echo "</rows>";
?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T15:44:07+00:00Added an answer on June 9, 2026 at 3:44 pm

    1. try to simply echo sample xml from php without any logic performed and see if it is received by JS script;

    2. as it was said, try to access PHP script directly in your browser and see if it returns valid result;

    3. try to debug your code in chrome (not only in ff:firebug), these are both great tools and sometimes chrome can show what ff missed (and vise versa).

    These steps will help you to isolate and find problem. If you’ll have all these bullets above checked and problem still there – provide results in topic, so we’ll have oportunity to help you.

    Cheers and good luck 😉

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello I am having trouble with a xml file I am using. Now what
Hello I am having trouble with a xml file I am using. Now what
Hello all I am having trouble uploading my blackberry alx file to the blackberry.
hello i am having same issue, i tried your solution but it didnt help
Hello good people of Stack Overflow, I am having great troubles with designing a
Hello I am making a reservation system and I am having troubles with my
Hello all having some trouble accessing elements from a returned JSON from Twitter. I'm
hello im having trouble overriding bootstraps framework when it goes into a production server.
Hello I'm having trouble with the following piece of code: <h:selectOneMenu id=selectTipoAutorizacion value=#{autorizacion.codigoTipoAutorizacion} required=true>
Hello i am having trouble with passing a php return value to the innerHTML

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.