<table id="tbl"> <tr> <td>Customer Code</td> <td>Customre Name</td> </tr> </table> <script type="text/javascript"> $.get("getCustomers", null, BindData); function BindData(Customers) { var tbl = $("#tbl"); for (var j = 0; j < Customers.lenght; j++) { var newRow = "<tr>" + "<td>" + Customers[j].CustomerCode + "</td>" + "<td>" + Customers[j].CustomerName + "</td>" + "</tr>"; tbl.append(newRow); } } </script>
check this line for (var j = 0; j < Customers.lenght; j++) { here use 'Customers.length' instead of 'Customers.lenght' spelling mistake ,may be all the other code seems ok. :)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)