<?php
include "../conexion.php";
$vent_id=$_GET['id']; 
?>
<div id="resultados_mod"></div> 
<form role="form" id="editar" >      
    <?php
        $can1=mysqli_query($con,"SELECT * from venta_detalle_temp where vent_id='$vent_id'") or die(mysqli_error($con)); 
        while ($row1=mysqli_fetch_array($can1))
        { 
            $vent_id=$row1['vent_id'];
            $vent_art_id=$row1['vent_art_id'];
        ?>
            <input type="hidden" name="vent_id" value="<?php echo $vent_id ?>">
            <input type="hidden" name="vent_art_id" value="<?php echo $vent_art_id ?>">
            <input class="form-control" title="Editar" type="text" name="vent_nombre" id="vent_nombre" value="<?php echo $row1['vent_nombre']; ?>" >
    <?php } ?>
    <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
        <button type="submit" id="modi" class="btn btn-primary">Modificar</button>
    </div>
</form>
<script>
$( "#editar" ).submit(function( event ) {
    $('#modi').attr("disabled", true);
    var parametros = $(this).serialize();
    $.ajax({
        type: "POST",
        url: "php_facturar/modificar_descripcion.php",
        data: parametros,
            beforeSend: function(objeto){
            $('#resultados_sab').html('<center><img src="./img/ajax-loader.gif"> CARGANDO...</center>');
            },
        success: function(datos){
        $("#resultados_mod").html(datos);
        $('#modi').attr("disabled", false);
        $('#descripcion_art_Modal').modal('hide');
        $('body').removeClass('modal-open');
        $('.modal-backdrop').remove();
        loadTabla();
        }
    });
    event.preventDefault();
})
</script>