Best way to persist data
Best way to persist data
Hi,
I have the following task in my hands: To create a datatables product catalog, that need to be persisted by several brands... I was wondering what is the easiest way to persist data in datatables? This is session data
[BrandA][BrandB][BrandC]
datatable
[prodid][name][quantity(editable)]
001 PA 50
002 PB 100
003 PC ---
004 PD 25
005 PE ---
006 PD ---
(...)
[Add to cart]
Once I click on BrandB or C I need to persist this data forProdA. Is there an easy way to do this?
Once all those prodcuts from multiple brands are selected I need to add them to a second table. I would like to have an object that contains only products with quantities set and process them for the second table (Shopping Cart Table).
I was thinking of using localStorage to do this, but perhaps there is a simpler way?
TIA
EDIT here is my test page
[code]
<!DOCTYPE html>
@import "js/DatatablesJQuery/demo_table.css";
<!-- Format Currency Plugin -->
<!-- DEBUG VERSION -->
$(document).ready(function() {
$('#exampleTableNEW').dataTable({
"aoColumnDefs": [
{ "sClass": "my_class", "aTargets": [ 4 ] }
],
"fnDrawCallback": function() {
$("td.my_class").editable();
}
});
});
.my_class{
background-color: #F3F781;
}
Ref
Engine
OS
Number
Quantity
Trident
Engine IE
Win 95+
40
10
Trident2
Engine IE2
Win 95+2
402
102
Trident3
Engine IE3
Win 95+3
403
103
[/code]
I have the following task in my hands: To create a datatables product catalog, that need to be persisted by several brands... I was wondering what is the easiest way to persist data in datatables? This is session data
[BrandA][BrandB][BrandC]
datatable
[prodid][name][quantity(editable)]
001 PA 50
002 PB 100
003 PC ---
004 PD 25
005 PE ---
006 PD ---
(...)
[Add to cart]
Once I click on BrandB or C I need to persist this data forProdA. Is there an easy way to do this?
Once all those prodcuts from multiple brands are selected I need to add them to a second table. I would like to have an object that contains only products with quantities set and process them for the second table (Shopping Cart Table).
I was thinking of using localStorage to do this, but perhaps there is a simpler way?
TIA
EDIT here is my test page
[code]
<!DOCTYPE html>
@import "js/DatatablesJQuery/demo_table.css";
<!-- Format Currency Plugin -->
<!-- DEBUG VERSION -->
$(document).ready(function() {
$('#exampleTableNEW').dataTable({
"aoColumnDefs": [
{ "sClass": "my_class", "aTargets": [ 4 ] }
],
"fnDrawCallback": function() {
$("td.my_class").editable();
}
});
});
.my_class{
background-color: #F3F781;
}
Ref
Engine
OS
Number
Quantity
Trident
Engine IE
Win 95+
40
10
Trident2
Engine IE2
Win 95+2
402
102
Trident3
Engine IE3
Win 95+3
403
103
[/code]
This discussion has been closed.