Greetings, I appreciate your kind support. I have a form to register products that are added to the table but I have no idea how to send them to mysql dede JSP .
<form id="detalle_boleta" class="form-horizontal" method="get"
action="Detalle_Ventas" role="form" autocomplete="off">
<div class="row">
<!--Inicia Definicion Table -->
<script type="text/javascript">
$(document).ready(function () {
$("#mytable").tablesorter();
});
</script>
<h3>Detalle de Venta.</h3>
<table class="tablesorter" id="mytable">
<thead>
<tr>
<th>Fecha</th>
<th>Producto</th>
<th>Precio</th>
<th>Cantidad</th>
<th>Total</th>
</tr>
</thead>
<tbody data-bind="foreach: detalle_ventas ">
<tr>
<td data-bind="text:$data.fecha"> </td>
<td data-bind="text:$data.producto"> </td>
<td data-bind="text:$data.precio"> </td>
<td data-bind="text:$data.cantidad"> </td>
<td data-bind="text:$data.total"> </td>
</tr>
</tbody>
</table>
</div>
</form>
</div>
<script type="text/javascript">
function DetalleBoleta() {
var self = this;
//vector que guardara la informacion temporalmente
self.detalle_ventas = ko.observableArray([]);
self.agregarproducto = function (){
var fe = $('#txtfecha').val();
var pro = $('#cbxproducto').val();
var pre = parseFloat($('#txtprecio').val());
var cant = parseInt($('#txtcantidad').val());
var tot=pre * cant;
alert("Producto Agregado");
self.detalle_ventas.push({fecha:fe, producto:pro, precio:pre, cantidad:cant,total:tot});
};
}
ko.applyBindings(new DetalleBoleta());
</script>