137
rated 0 times
[
140]
[
3]
/ answers: 1 / hits: 81649
/ 9 Years ago, fri, august 21, 2015, 12:00:00
I'm using bootstrap table. In that I want to get Item ID
value/values of selected table rows after clicking 'Add to cart'
button present on same page.
Table code:
<table data-toggle=table id=table-style data-row-style=rowStyle data-url=tables/data2.json data-show-refresh=true data-show-toggle=true data-show-columns=true data-search=true data-select-item-name=toolbar1 data-pagination=true data-sort-name=name data-sort-order=desc data-single-select=false data-click-to-select=true data-maintain-selected=true>
<thead>
<tr>
<th data-field=state data-checkbox=true></th>
<th data-field=id >Item ID</th>
<th data-field=name data-sortable=true>Product Name</th>
<th data-field=price data-sortable=true>Actual Price</th>
<th data-field=discount_price data-sortable=true>Discount Price</th>
<th data-field=stock_avail data-sortable=true>Stock Available</th>
</tr>
</thead>
</table>
JQuery code:
$(document).ready(function()
{
$(#add_cart).click(function()
{
//foreach selected row retrieve 'Item ID' values in array;
//call ajax for otherpage.php?arr='Item ID array';
});
});
As I'm new in bootstrap I'm trying to tackle this but not getting proper solution anybody please advise me this.
More From » jquery