0
I have this line of code:
<input type="text" class="form-control" id="usado" placeholder="Quantidade" aria-describedby="basic-addon1">
<span class="input-group-addon" id="basic-addon1" onclick="usaEstoque(usado,<?php echo $arrDados['produto']; ?>)"><span class="glyphicon glyphicon-fire"></span></span>
I’m trying to take the input value and the product id value (this working on other buttons), in order to remove the quantity placed in the stock input. In general lines, I am trying to update the stock on the page itself.
I created the javascript function to test:
function usaEstoque(usado,id){
var qtdUsado = usado;
var idProduto = id;
alert(qtdUsado, idProduto)
};
What do you mean specifically with 'update the stock on the page'? You access the bank to give
UPDATE
or this update is only in memory with Javascript?– feresjorge
Access to the bank. I already have a trial ready for this, I’m just locking in time to get the data to pass to JS function.
– Felipe