json encode pour le futur

This commit is contained in:
Michael RICOIS 2012-01-30 15:11:33 +00:00
parent 08284a2263
commit bec115bae9
2 changed files with 3 additions and 3 deletions

View File

@ -41,7 +41,7 @@ class IndexController extends Zend_Controller_Action
$db = Zend_Registry::get('db');
$commandesM = new Application_Model_Commandes($db);
$row = $commandesM->find($id);
echo $row->nbLigneT;
echo json_encode(array('nbLigneT' => $row->nbLigneT));
}
}

View File

@ -26,7 +26,7 @@ function updateInfo()
var objet = $(this);
var id = $(this).attr('id');
$.getJSON('/index/getinfo', {id: id}, function(data){
if (data!=''){ objet.find('td.ligne').text(data); }
if (data!=''){ objet.find('td.ligne').text(data.nbLigneT); }
});
});
}