0
I have a page that contains a dynamic table where the user adds new lines and then clicks on a button to calculate the order value where I direct it to a new page showing the total order value and some other information.
The problem is that when he clicks back to change some information and recalculate the lines he added do not appear, only the first that was already loaded initially when opening the page with the information he typed.
The function I’m using to add new lines is below:
AddTableRow = function () {
var cols = "";
var nLinhas = document.getElementsByClassName('row1').length + 1;
var newRow = $('<tr class="row1" id="' + nLinhas + '">');
cols += '<td class="cell"><input type="text" name="cods[]" class="cods" size="20%"><input type="hidden" name="apagado[]" value="0"></td>';
cols += '<td class="cell"><input type="text" name="descri[]" size="40" class="descri" size="50%"></td>';
//cols += '<td class="cell"><input type="text" name="preco[]" id="preco" size="10%" readonly="readonly" step="any" placeholder="0.00"></input></td>';
cols += '<td class="cell"><input type="number" name="qtde[]" size="5%"></input></td>';
cols += '<td class="cell"><input type="text" name="numoc[]" size="5%" maxlength="6"></input></td>';
cols += '<td class="cell"><input type="text" name="itemoc[]" size="5%" maxlength="4"></input></td>';
cols += '<td class="cell"><button onclick="RemoveTableRow(this)" type="button" size="5%">Remover</button></td>';
cols += '</tr>';
newRow.append(cols);
$("#itens").append(newRow);
return false;
};
you use a Session to save the information
– emerson sena de souza