skip to Main Content

How to reexecute java script when new elements added to document model – Jquery ajax

I implemented paging and filtering for page with list of products. @model ProductFiltersViewModel ... <div class="row"> <aside class="col-3"> <nav class="sidebar card py-2 mb-4"> <ul class="nav flex-column" id="nav_accordion"> <form asp-action="LoadGames" id="filters-form"> <input type="hidden" asp-for="PaginationInfo.PageNumber" /> <li class="nav-item"> <div class="container-fluid"> <span>Page Size</span>…

VIEW QUESTION

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
Back To Top
Search