i have 2 tables in jsp.1st table i am getting through Ajax.how to display json object in jsp
i have 2 tables in jsp.1st table i am getting through Ajax.how to display json object in jsp
Rajeswari_satya
Posts: 1Questions: 1Answers: 0
i am getting Json object from
SourceReport Handler like jsonObject{"sEcho":"1","iTotalDisplayRecords":5,"aaData":[{"POST_DELIVERY":null,"SRLNO":"1","ACTIVATION_DATE":"2013-04-15 11:40:00.0","COURIER_DELIVERY":null,"EMAIL_DELIVERY":null,"EMAIL_DELIVERY_STATUS":null,"CUSTOMER_MSISDN":"7506050785"}]} i want to check condition in jsp like if iTotalDisplayRecords count more than 0 then only show 2nd table.
SourceDeliveryReport.jsp:
tableVariable = $('#example').dataTable({
"bSort": true,
"bPaginate": true,
"sPaginationType": "full_numbers",
"bServerSide": true,
"sAjaxSource": "/WelcomeAutomation/SourceReportHandler",
"bProcessing": true,
"bAutoWidth": false,
"bInfo": false,
"bDestroy": true,
"aaSorting": [[ 0, "desc" ]],
"fnServerData": function ( sSource, aoData, fnCallback ) {
aoData.push( { "name": "fill", "value": "Report" } );
aoData.push( { "name": "startDate", "value": $start.val() } );
aoData.push( { "name": "endDate", "value": $end.val() } );
$.ajax( {
"dataType": 'json',
"type": "GET",
"url": sSource,
"data": aoData,
"success": fnCallback
} );
},
"aoColumns": [ {"mDataProp": "SRLNO"},
{"mDataProp": "CUSTOMER_MSISDN"},
{ "mDataProp": "ACTIVATION_DATE"},
{ "mDataProp": "EMAIL_DELIVERY"},
{ "mDataProp": "EMAIL_DELIVERY_STATUS" },
{ "mDataProp": "COURIER_DELIVERY" },
{ "mDataProp": "POST_DELIVERY"},
]
});
i am getting data properly but i want to display iTotalRecord and based on that i have to check condition.
Please help me anyone.Thanks in advance.
This discussion has been closed.