0
I have a form I need to send whenever I give a focusout in the input of the value. However I’m not getting it to give the Submit. 
Any tips for doing this? Thanks in advance.
<?php foreach ($produtos as $produto) {
            echo "<div class='span5'>";
            echo form_open(base_url()."backend/home/alterar_preco/".$produto->id_produto, "id = salva_preco");
            echo "<div class='produtos'>
            <div style='float:left;'><img src=".base_url()."uploads/produtos/".$produto->foto." title=".$produto->nome."></div>
            <div class='descricao_produto'>
                <font size='4'>".$produto->nome."</font><br>
                <font size='2'>".$produto->descricao."</font><br>
                <input type='text' name='preco_produto' style='width:60px;' value='".number_format($produto->preco,2,",",".")."' placeholder='Preço' class='preco'>
            </div>
        </div>";
    echo form_close();
    echo "</div>";
} ?>
$(document).ready(function(){
$('.preco').focusout(function(){
    $("#salva_preco").submit(function(){
        var dados = jQuery( this ).serialize();
        $.ajax({
            url: CI_ROOT + "backend/home/salva_preco",
            data: {
                dados:dados,
            },
            dataType: "json",
            type: "POST",
            success: function(data){
            }
        });
    });
});
});
You can put the rendered HTML, ie the client-side HTML to the
<form>?– Sergio