<div id="espera" class="modal fade" tabindex="-1" role="dialog">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-body">
                <form name="form_espera" id="form_espera" method="post" action="">
                    <div class="alert alert-success alert-dismissable">
                        <strong>Desea realmente colocar la venta en espera !</strong> <a href="#" class="alert-link"></a>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">NO</button>
                        <button name="btn_espera" id="btn_espera" type="submit" class="btn btn-success"><i class="icon-ok"></i> <strong>SI</strong></button>
                    </div>
                </form>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div> 
<script type="text/javascript">
$("#btn_espera").click(function(event) {
$('#btn_espera').attr("disabled", true);
var parametros = $("#form_guia, #form_espera").serialize();
    $.ajax({
        type: "POST",
        url: "php_facturar/registrar_espera.php",
        data: parametros,
        beforeSend: function(objeto){
         $('#carga').html('<center><img src="./img/ajax-loader.gif"> CARGANDO...</center>');
        },
        success: function(datos){
        $("#carga").html(datos);
        $('#btn_espera').attr("disabled", false);

        $('#cancelar').modal('hide');
        $('body').removeClass('modal-open');
        $('.modal-backdrop').remove();
        loadTabla();
        loadtotal();
        loadcliente();
        loadbotones();
        limpiar_campos();
        limpiar_buscador();
        loadtexto();
        load(1);
    }
});
event.preventDefault();
})
</script>