Viewing file: gest_credito_view.php (3.14 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<div> <h1><?= $titulo ?></h1> <div id="buscador"> <br> <form action="<?php echo base_url()?>notaCredito/index/" method="post"> <input type="text" name="buscando" id="buscando" /> <input type="submit" class="btn btn-primary btn-lg" value="Buscar" /> </form> </div> <div class="col-md-10"> <form action="<?php echo base_url()?>notaCredito/newCredito/" method="post" name="factura"> <?php $this->table->set_heading( 'LOCAL','RAZON SOCIAL', 'DIRECCION','LOCALIDAD','CORREO' ,'TELEFONO','ACCION'); //crea la primera fila de la tabla con el encabezado $tmp = array ( 'table_open' => '<table class="table table-bordered table-striped" id="busquedaRecibo" width="100%">' ); //modifica el espaciado $this->table->set_template($tmp); //aplico los cambios de modificacion anterior foreach($results->result() as $dato): $this->table->add_row($dato->nombre,$dato->razon_social,$dato->direccion,$dato->localidad,$dato->mail,$dato->telefono,'<input class="btn btn-primary btn-lg" type="submit" name="botonDetalle" id="botonDetalle" class="btnBoton" value="crear Nota Credito" onclick="GuardarValor('. $dato->id.')">'); //agregamos la celda a la tabla por cada iteracion endforeach; echo $this->table->generate(); //cuando termina generamos la tabla a partir del vector echo $this->pagination->create_links(); ?> <br> <input type="hidden" name="numeroClienteCredito" id="numeroClienteCredito" value=""> </input> </form> </div> </div> <script type="text/javascript"> function GuardarValor(numeroCliente){ document.getElementById("numeroClienteCredito").value=numeroCliente; } $('form').keypress(function(e){ if(e == 13){ return false; } }); $('input').keypress(function(e){ if(e.which == 13){ return false; } }); document.onkeydown = function(){ if (window.event && (window.event.keyCode == 8)) { valor = document.activeElement.value; if (valor==undefined) { return false; } //Evita Back en página. else { if (document.activeElement.getAttribute('type')=='sel ect-one') { return false; } //Evita Back en select. if (document.activeElement.getAttribute('type')=='but ton') { return false; } //Evita Back en button. if (document.activeElement.getAttribute('type')=='rad io') { return false; } //Evita Back en radio. if (document.activeElement.getAttribute('type')=='che ckbox') { return false; } //Evita Back en checkbox. if (document.activeElement.getAttribute('type')=='fil e') { return false; } //Evita Back en file. if (document.activeElement.getAttribute('type')=='res et') { return false; } //Evita Back en reset. if (document.activeElement.getAttribute('type')=='sub mit') { return false; } //Evita Back en submit. else //Text, textarea o password { if (document.activeElement.value.length==0) { return false; } //No realiza el backspace(largo igual a 0). else { document.activeElement.value.keyCode = 8; } //Realiza el backspace. } } } if(window.event && window.event.keyCode == 505){ window.event.keyCode = 505; } } </script>
|