azzy_vbulletin3_import39032
New Member
i have a problem and firebug dont show me any problem :/ My funcions.js\[code\]/* * To change this template, choose Tools | Templates * and open the template in the editor. */Ext.require([ 'Ext.grid.*', 'Ext.data.*', 'Ext.util.*', 'Ext.state.*' ]);Ext.onReady(function() { Ext.QuickTips.init(); // setup the state provider, all state information will be saved to a cookie Ext.state.Manager.setProvider(Ext.create('Ext.state.CookieProvider')); var store = Ext.create('Ext.data.Store', { autoLoad: true, proxy: { type: 'ajax', url: 'src.php' } }); var grid = Ext.create('Ext.grid.Panel', { store: store, stateful: true, collapsible: true, multiSelect: true, stateId: 'stateGrid', columns: [ { text : 'Nombre Chofer', flex : 1, sortable : false, dataIndex: 'nombre_chofer' } ], height: 350, width: 600, title: 'Array Grid', renderTo: 'grid-example', viewConfig: { stripeRows: true, enableTextSelection: true } });});\[/code\]My src.php (AJAX)\[code\]<?phpinclude_once 'funciones/header_server.php';include_once 'model/ChoferModel.php';function getList() { $choferModel = new ChoferModel(); $resultQuery = $choferModel->getTable(); $conteo = count($resultQuery) - 1; $resultQuery = (array) $resultQuery; if ($conteo > 0) { foreach ($resultQuery as $chofer) { $rec['nombre_chofer'] = $chofer['NOMBRE_CHOFER']; $arr[] = $rec; } $jsonresult = JEncode($arr); echo $jsonresult; }}getList();\[/code\]And my index.php\[code\]<?php//include_once 'funciones/header_server.php';//include_once 'model/ChoferModel.php';?><!DOCTYPE html><html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Sistema para control de viaticos - COPRA</title> <link rel="stylesheet" type="text/css" href="http://stackoverflow.com/questions/10561396/script/ext-all.css" /> <script type="text/javascript" charset="utf-8" src="http://stackoverflow.com/questions/10561396/script/ext-all-dev.js"></script> <script type="text/javascript" charset="utf-8" src="http://stackoverflow.com/questions/10561396/script/ext.js"></script> <script src="http://stackoverflow.com/questions/10561396/script/funcions.js"></script> </head> <body> <div id="grid-example" name="grid-example"></div> </body></html>\[/code\]My output is black, dont show table or grid... please help me.. Screenshots:src output: http://i.stack.imgur.com/zLMgz.png