How can i check if the select did not find any rows so i can hide the field?
pasEditor.dependent('passcons.pas_turno', function (val, data, callback) {
if ( val ){
// cerca nella tabella tris se esiste un nominativo che ha
// tris.pas_turno = passcons.pass_turno e
// tris.tri_giorno = numero del giorno ricavato dalla data
pdata = pasEditor.val("passcons.pas_data");
//alert(pdata+" - "+val);
$.ajax({
type: "POST",
url: 'php/chk_giorno.php',
async: true,
data: {pdata: pdata, pturno: val},
dataType: "json",
success: function (data) {
if...
---> I would like to hide the field if the query found no rows <--
pasEditor.hide('passcons.pas_idtris');
else...
callback( data );
},
error: function (data) {
alert("Errore chk_giorno.php");
},
});
}
return {};
} );``
Thank for help...
Giuseppe