$.ajax( { type: "POST", url: "../../GeneralService.asmx/Get_Bill_Desk_Items", dataType: "json", data: {}, contentType: "application/json; charset=utf-8", success: function (json) { var xmlDoc = ""; var xml = ""; xmlDoc = $.parseXML(json.d); xml = $(xmlDoc); document.getElementById("PopulateBillDeskItems").innerHTML = ""; $(xml).find("Table").each(function () { var Category = $(this).find("Category").text(); var Table_Room_Code = $(this).find("Table_Room_Code").text(); var Table_Room_No = $(this).find("Table_Room_No").text(); var Item_Total = $(this).find("Item_Total").text(); $("#PopulateBillDeskItems").append(" <tr class='gradeX'><td>" + Category + "</td><td>" + Table_Room_Code + "</td><td>" + Table_Room_No + "</td><td class='center'>" + Item_Total + "</td></tr>"); }); } });
<table id="table-example" class="table"> <thead> <tr> <th>Category</th> <th>Table-Room Code</th> <th>Table-Room NO</th> <th>Total AMT</th> </tr> </thead> <tbody id ="PopulateBillDeskItems"></tbody> </table>
xmlDoc = $.parseXML(json.d);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)