Hi!, y trying to send a composite values to JSON to catch some DB values and the fill a textfields in the form.
This is the Composite field
Code:
{ columnWidth: 0.2,
layout: 'form',
items: [{
xtype: 'compositefield',
fieldLabel: 'Rut',
msgTarget: 'under',
items: [{
xtype: 'textfield',
name: 'rut',
id: 'id_rut',
width: 150
},
{xtype: 'displayfield', value: '-'
},
{
xtype: 'textfield',
name: 'dv',
id: 'id_dv',
width: 50
}]
}]
}
Here the store
Code:
var store_datosPersonales = new Ext.data.Store // ({
proxy: new Ext.data.HttpProxy({
url: 'json/DatosPersonales.php?accion=cargarPersonales',
method: 'POST'
}),
reader: new Ext.data.JsonReader
({
fields: ['rut','dv'],
root: 'rows'
}),
autoLoad: true
});
and the json
Code:
<?phpinclude_once("../../libfinanzas/inc_readme.php");
$link = conectarse_Finanzas();
$accion = $_REQUEST['accion'];
$rut = $_REQUEST['mper_rut'];
$dv = $_REQUEST['mper_dv'];
if($accion=='cargarPersonales') // listo
{
$SQL_datosPersonales = "SELECT mp.mper_apellido_paterno, mp.mper_apellido_materno, mp.mper_nombres, mp.esci_codigo FROM
comun.dbo.maestro_personas AS mp where mp.mper_rut = $rut AND mp.mper_dv = $dv" ;
// **** Funcion Crear JSON ****
$respuesta = CreaJSon($SQL_datosPersonales, $link, 'rows',1);
echo $respuesta;
?>
the problem is that i dont know how are connected the variables between these files.
How can i connect this files?
PD: CreaJson is a Library function that send the request values to form.
Thanks!!