<form method="post" name="modif_mesa" id="modif_mesa">
    <div class="modal fade" id="modificar_mesa" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">Modificar Mesa</h4>
                </div>
                <div class="modal-body">
                    <div id="resultados_fam"></div> 
                    <div class="form-group  ">
                        <label for="nombres" class="col-sm-4 control-label">Nombre</label>
                        <input type="hidden" class="form-control" id="id" name="id" required >
                        <input type="text" class="form-control" id="nombre" name="nombre"  required>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
                        <button type="submit" id="btn_mesa"  class="btn btn-success">Modificar</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</form>
<script >
$("#modif_mesa" ).submit(function( event ) {
$('#btn_mesa').attr("disabled", true);
var parametros = $(this).serialize();
   $.ajax({
      type: "POST",
      url: "php_mesas/editar_mesa.php",
      data: parametros,
        beforeSend: function(objeto){
         $('#resultados_mesa').html('<center><img src="./img/ajax-loader.gif"> CARGANDO...</center>');
        },
      success: function(datos){
      $("#resultados_mesa").html(datos);
      $('#btn_mesa').attr("disabled", false);
      load(1);
      }
  });
  event.preventDefault();
})
</script>
