How to use Json
------------
Controller
--------------------------
$return['plyrAvalFlag']=$res['plyrAval'];
$return['plyrUsrid']=$res['plyrUserid'];
$return['prntUserid']=$res['prntUserid'];
$this->_helper->json($return);
Js
-------------------------------
$.ajax({
type : "POST",
url: g_site_path+'/teamregister/teamupdateform',
data : $('#frmTeamstepone,#frmPlayerReg,#frmParentReg,#frmParenttwoReg').serialize(),
dataType: "json",
success: function(data) {
$('#hidPlyrAvalFlag').val(data.plyrAvalFlag)
$('#hidplyrUsrid').val(data.plyrUsrid)
$('#hidprntUsrid').val(data.prntUserid)
});
}
No comments:
Post a Comment