-1
As I do to take the last value inserted in SPAN and add another 10 to save in BD, the insertion is all ok, I need to delete the input and each time BD add another 10. Example: Product 100 by clicking the button, Product 110 so on, no refresh 1 cent auction site type. I built this script below and this worked insertion, but client puts the value you want, I need to delete the input and add the values by clicking the button Personal Thank you.....
<script>
$(document).ready(function(){
$('#load_button').click(function(){
var valor_txt = $('#valor').val();
if($.trim(valor_txt) != '')
{
$.ajax({
url:"produtos/insert.php",
method:"POST",
data:{arremate:valor_txt},
dataType:"text",
success:function(data)
{
$('#valor').val("");
}
});
}
});
setInterval(function(){
$('#load_price').load("produtos/arremate.php").fadeIn("slow");
}, 1000);
});
</script>
<input type="text" name="valor" id="valor" class="form-control" /> <!-- envia valor para o DB -->
<input type="button" name="load_button" id="load_button" value="valor" class="btn btn-info" />
<span class="item_price" name="load_price" id="load_price"></span>