skip to Main Content

get total of a dynamically loaded table's column – Jquery ajax

I am loading a table with the following jquery function get_sales(customer_id,from_date,to_date){ $.ajax({ type: 'POST', url: 'ajax/sale_pl.php', data:{customer_id:customer_id,from_date:from_date,to_date:to_date}, dataType:"json", success: function(response){ //console.log(response); for(i=0; i<response.length; i++) { $('#tdata').append('<tr>'+ '<td><a href="view_invoice.php?id='+response[i].invoice_id+'">'+response[i].invoice_id+'</a></td>'+ '<td>'+response[i].order_date+'</td>'+ '<td><h6 class="mb-1">'+response[i].product_name+'</h6></td>'+ '<td><h6 class="text-muted">'+response[i].product_code+'</h6></td>'+ '<td>'+response[i].sold_qty+'</td>'+ '<td>'+response[i].buy_price+'</td>'+ '<td>'+response[i].sell_price+'</td>'+ '<td>'+response[i].discount+'</td>'+ '<td>'+response[i].cost_price+'</td>'+ '<td>'+response[i].sold_price+'</td>'+ '<td…

VIEW QUESTION

Change value using CheckBox on table – Jquery ajax

I have this hbs code: <table> <tr> <th>A</th> <th>B</th> </tr> {{#each data2}} <tr> <td> <input type='checkbox' id='nm_produk' class='product' name='data_{{no}}' value="{{no}}"> <label>{{item}}</label> </td> <td> <input disabled type='text' placeholder='0' name='data_{{no}}' id='qtytbs'> </td> </tr> {{/each}} </table> And this script: $(document).ready(function() { $(".product").change(function() {…

VIEW QUESTION

How to add the content `…<span class="sr-only">(current)</span></a>` into the HTML link when using Angular 2 **routerLink**? – Twitter bootstrap

Just wanting to know how include <span class="sr-only">(current)</span> on my clicked active link when using Angular 2 routerLink? Example: <ul class="nav nav-sidebar"> <li routerLinkActive="active"> <a routerLink="/dashboard">Dashboard <span class="sr-only">(current)</span></a> </li> <li> <a href="">Registers</a> </li> <li routerLinkActive="active"> <a routerLink="/organizations">Organizations</a> </li> </ul> Sources:…

VIEW QUESTION
Back To Top
Search