<div id="modal_numero" class="modal fade" tabindex="-1" role="dialog">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title">Numero de Venta</h4>
            </div>
            <form name="form1" method="post" name="numero" id="numero">
  	            <div class="modal-body">
                    <label>Prefijo</label>
                    <input type="text" name="prefijo" id="prefijo" class="form-control" autocomplete="off" value=""> 
                    <label>N Venta</label>
    				<input type="text" name="venta_n" id="venta_n" class="form-control" autocomplete="off" value="">
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
                        <button name="aceptar" id="aceptar"  type="submit" class="btn btn-success"><i class="icon-ok"></i> <strong>Aceptar</strong></button>
                    </div>
    			</div>
          	</form>
        </div><!-- /.modal-content -->
	</div><!-- /.modal-dialog -->
</div>
<script>
$("#numero" ).submit(function( event ) {
$('#aceptar').attr("disabled", true);
var parametros = $(this).serialize();
$.ajax({
    type: "POST",
    url: "php_garantias/seleccion.php",
    data: parametros,
    beforeSend: function(objeto){
         $('#resul').html('<center><img src="./img/ajax-loader.gif"> CARGANDO...</center>');
        },
    success: function(datos){
    $("#resul").html(datos);
    $('#aceptar').attr("disabled", false);
    }
});
event.preventDefault();
})

$('#modal_numero').on('shown.bs.modal', function() {
    $("#venta_n").focus();
});
</script> 