Ver Mensaje Individual
  #5 (permalink)  
Antiguo 07/06/2010, 15:45
warbandit69
 
Fecha de Ingreso: diciembre-2008
Ubicación: http://www.solucionesrios.tk/
Mensajes: 413
Antigüedad: 15 años, 4 meses
Puntos: 19
Respuesta: Problemas con Arreglo dentro de otro Arreglo

Solo le coloco saltos de lineas al codigo javascript, y funciona.

Asi no funciona, que es cuando lo llamo con la funcion PHP, y quedaria en el codigo de la pagina asi:

Código HTML:
<script type="text/javascript">

Ext.onReady(function(){var myData = [['15727241','Ricardo','Ríos','[email protected]','ricardorios'],['9792332','Vitaliano','Giannangeli','[email protected]','vgr']];var store = new Ext.data.Store({proxy: new Ext.ux.data.PagingMemoryProxy(myData),remoteSort:true,sortInfo: {field:'cedula', direction:'DESC'},reader: new Ext.data.ArrayReader({fields: [{name:'cedula'},{name:'nombre'},{name:'apellido'},{name:'correo'},{name:'usuario'}]})})var grid = new Ext.grid.GridPanel({store: store,    columns: [{id: "cedula", width: 120,  sortable: true, dataIndex: 'cedula'}, {header: "nombre", width: 120, sortable: true, dataIndex: 'nombre'},{header: "apellido", width: 120, sortable: true, dataIndex: 'apellido'},{header: "correo", width: 120, sortable: true, dataIndex: 'correo'},{header: "usuario", width: 120, sortable: true, dataIndex: 'usuario'}    ],   stripeRows: true,    autoExpandColumn: 'cedula',    height:320,   width:600,   frame:true,   title:'PRUEBA',  plugins: new Ext.ux.PanelResizer({       minHeight: 100   }),bbar: new Ext.PagingToolbar({pageSize: 10,store: store,displayInfo: true,plugins: new Ext.ux.ProgressBarPager()   })});grid.render('PRUEBA');store.load({params:{start:0, limit:10}});});
</script>

Y asi si funciona

Código HTML:
<script type='text/javascript'>

Ext.onReady(function(){

	var myData = [
		['15727241','Ricardo','Ríos','[email protected]','ricardorios'],
		['9792332','Vitaliano','Giannangeli','[email protected]','vgr']
	];

	var store = new Ext.data.Store({
	proxy: new Ext.ux.data.PagingMemoryProxy(myData),
	remoteSort:true,
	sortInfo: {field:'cedula', direction:'DESC'},
	reader: new Ext.data.ArrayReader(
	{fields: [
		{name:'cedula'},
		{name:'nombre'},
		{name:'apellido'},
		{name:'correo'},
		{name:'usuario'}]
	})
	})

	var grid = new Ext.grid.GridPanel(
		{store: store,    columns: [
			{id: "cedula", width: 120,  sortable: true, dataIndex: 'cedula'}, 
			{header: "nombre", width: 120, sortable: true, dataIndex: 'nombre'},
			{header: "apellido", width: 120, sortable: true, dataIndex: 'apellido'},
			{header: "correo", width: 120, sortable: true, dataIndex: 'correo'},
			{header: "usuario", width: 120, sortable: true, dataIndex: 'usuario'}    
	],   

	stripeRows: true,    
	autoExpandColumn: 'cedula',    
	height:320,   
	width:600,   
	frame:true,   
	title:'PRUEBA',  

	plugins: new Ext.ux.PanelResizer({       
		minHeight: 100   
	}),

	bbar: new Ext.PagingToolbar({
		pageSize: 10,
		store: store,
		displayInfo: 
		true,plugins: new Ext.ux.ProgressBarPager()  
	})

	});

	grid.render('PRUEBA');
	store.load({params:{start:0, limit:10}});
	});

</script> 
__________________
http://www.solucionesrios.tk/

Visita mi Web!