problema al querer implementar ajax y validate en bootstrap dialog

(1/1)

geshiro:
el problema que es cuando quiero validate en action: es  lo que hara el boton pero como pudiera hacer que cuando campos vacios no avanze y no se quite el modal y cuando si se vaya al $.ajax(); y  haga el spin si me pudiera ayudar como implementarlo seria bueno.... si me pudieran hechar la mano?

Código
<section class="content">
           <section class="col-lg-12 connectedSortable">
               <div class="box">
                   <div class="box-header">
                       <div class="box-title">Lista De Productos</div>
                   </div>
                   <div class="box-body">
                     <button class="btn btn-primary" id="add_item">New item</button>
                       <table id="example" class="table table-bordered table-striped">
                           <thead>
                               <tr>
                                   <th>Nombre del proveedor</th>
                                   <th>RFC</th>
                                   <th>Teléfono</th>
                                   <th>Correo electrónico</th>
                                   <th>Domicilio</th>
                               </tr>
                           </thead>
                       </table>
                   </div>
               </div>
           </section>
       </section>
 

Código
 $(function(){
URL_GET_DATATABLE = BASE_URL+'inventory/provider/datatable';
$('#example').DataTable({
"lengthChange": false,
ajax: {
url: URL_GET_DATATABLE,
type: 'POST'
}
});
 
$('#add_item').on('click',function(){
BootstrapDialog.show({
message:  $("<form class='form-inline' id='providerForm'><div class='form-group'><label class='full_name'>Full name</label> <input type='text' class='_full_name form-control' name='full_name'></div><div class='form-group'><label class='phone' for='phone'>Phone</label> <input type='text' class='_phone form-control'></div><div class='form-group'><label class='email' for='email'>E-mail</label> <input type='text' class='_email form-control'></div><div class='form-group'><label class='rfc' for='email'>Rfc</label> <input type='text' class='_rfc form-control'></div><div class='form-group'><label class='address' for='address'>Address</label> <input type='text' class='_address form-control'></div>"),
closable: true,
           closeByBackdrop: false,
           closeByKeyboard: false,
buttons: [{
id: 'submit',
icon: 'glyphicon glyphicon-send',
               label: 'Send ajax request',
               cssClass: 'btn-primary',
               autospin: true,
               action: function (dialogRef) {
                dialogRef.enableButtons(false);
                   dialogRef.setClosable(false);
               }
}]
});
});
});
 
 

bengy:
yo tuve un problema similar y aca esta mi tema

http://foro.elhacker.net/desarrollo_web/ayuda_ajax_no_funcionaen_expressjs-t456898.0.html

leelo y espero que te sirva

saludasos...

geshiro:
ah no es diferente pero igual gracias

Navegación

[0] Índice de Mensajes