Estoy haciendo unas pruebas con el framework jQWidgets para mostrar datos en un grid y para ellos estoy haciendo las cosas tal cual como en este ejemplo, en otras palabras copie y pegue para verlo funcionar y familiarizarme con este framework pero adaptandolo a mi base de datos.
Código:
  
El archivo data.php es el siguiente:  <script type="text/javascript">
        $(document).ready(function () {
            // prepare the data
            var source =
            {
                datatype: "json",
                datafields: [
                    { name: 'nombre'},
                    { name: 'empresa'},
                    { name: 'ciudad'},
                    { name: 'email'},
                    { name: 'telefono_celular'},
                ],
                url: 'data.php',
				cache: false
            };
            var dataAdapter = new $.jqx.dataAdapter(source);
			
			$("#jqxgrid").jqxGrid(
            {
                source: dataAdapter,
                theme: 'classic',
                columns: [
                  { text: 'Nombre', datafield: 'nombre', width: 250},
                  { text: 'Empresa', datafield: 'empresa', width: 150 },
                  { text: 'Ciudad', datafield: 'ciudad', width: 180 },
                  { text: 'E-mail', datafield: 'email', width: 200 },
                  { text: 'Teléfono Celular', datafield: 'telefono_celular', width: 120 }
              ]
            });        
        });
    </script>
Código PHP:
   <?php
#Include the connect.php file
include('connect.php');
#Connect to the database
//connection String
$connect = mysql_connect($hostname, $username, $password)
or die('Could not connect: ' . mysql_error());
//select database
mysql_select_db($database, $connect);
//Select The database
$bool = mysql_select_db($database, $connect);
if ($bool === False){
    print "can't find $database";
}
// get data and store in a json array
$query = "SELECT * FROM usuarios";
$from = 0; 
$to = 30;
$query .= " LIMIT ".$from.",".$to;
 
$result = mysql_query($query) or die("SQL Error 1: " . mysql_error());
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
    $customers[] = array(
        'nombre' => $row['nombre'],
        'empresa' => $row['empresa'],
        'ciudad' => $row['ciudad'],
        'email' => $row['email'],
        'telefono_celular' => $row['telefono_celular']
      );
}
//print_r($customers);
echo json_encode($customers);
?>    Cuando veo la consola de Chrome aparece este mensaje:
 Cita:   
y en firefox me decia q habia problemas con la codificacion y el tipo.chrome.tabs is not available: You do not have permission to access this API. Ensure that the required permission or manifest property is included in your manifest.json.
 coloque esta etiqueta meta:
Código HTML:
 <meta http-equiv="Content-Type" content="application/json; charset=utf-8"> Alguien ah usado este framework? que podria estar haciendo mal?
Gracias...
 

