Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- function Filtro(){
- if(document.getElementById('filtro').style.display == 'none'){
- document.getElementById('filtro').style.display='';
- document.getElementById('pesquisa').focus();
- }else
- document.getElementById('filtro').style.display='none';
- }
- function Filtrar(){
- if(document.getElementById('nome').checked)
- document.form1.campofiltro.value = document.getElementById('nome').value;
- else
- if(document.getElementById('codigo').checked)
- document.form1.campofiltro.value = document.getElementById('codigo').value;
- else
- if(document.getElementById('cnpj').checked)
- document.form1.campofiltro.value = document.getElementById('cnpj').value;
- document.form1.textopesquisa.value = document.getElementById('pesquisa').value;
- document.getElementById('acao').value='Filtrar';
- document.form1.submit();
- }
- function Todos(){
- document.form1.textopesquisa.value = '%';
- document.getElementById('acao').value='Filtrar';
- document.form1.submit();
- }
- function Excluir(cod){
- if(confirm('Deseja excluir registro?')){
- document.getElementById('acao').value='Excluir';
- document.getElementById('cod').value=cod;
- document.form1.submit();
- }
- }
- function AltSenha(cod){
- document.getElementById('acao').value='AltSenha';
- document.getElementById('cod').value=cod;
- document.form1.submit();
- }
- function Pagina(i){
- document.form1.hpag.value = i;
- document.form1.acao.value = "";
- document.form1.submit();
- }
- function Ordena(campo){
- if(campo==document.form1.campoordem.value){
- if((document.form1.contordem.value == '')|| (document.form1.contordem.value == 1)){
- document.form1.acao.value = 'Filtrar';
- document.form1.contordem.value = 2;
- document.form1.campoordem.value = campo;
- document.form1.submit();
- }else
- if(document.form1.contordem.value == 2){
- document.form1.contordem.value = 1;
- document.form1.campoordem.value = campo;
- document.form1.acao.value = 'Filtrar';
- document.form1.submit();
- }
- }else{
- document.form1.contordem.value = 2;
- document.form1.campoordem.value = campo;
- document.form1.acao.value = 'Filtrar';
- document.form1.submit();
- }
- }
- </script>
- <....>
- <div class="botao_buscar">
- <a href="#" onclick="Filtrar()" name="botao" value="Filtrar" id="botao_buscar" style="color:#FFF; text-shadow: black 0.1em 0.1em 0.2em;"> Buscar<img src="imagens/lupa.png" style="float: right;" border="0"></a>
- </div>
- </td>
- <!-- Fim Oculta Filtro -->
- </tr>
- </table>
- <table class="style4" width="100%" cellpadding="0" cellspacing="0">
- <tr class="titulo"><!-- Colunas da tabela -->
- <td width="8%" onclick="JavaScript:Ordena('codigo')" style="cursor:pointer" align="center">Código</td>
- <td width="37%" onclick="JavaScript:Ordena('nome')" style="cursor:pointer">Nome</td>
- <td width="35%" onclick="JavaScript:Ordena('email')" style="cursor:pointer">Email</td>
- <td width="5%" onclick="JavaScript:Ordena('editar')" style="cursor:pointer" align="center">Editar</td>
- <td width="10%" onclick="JavaScript:Ordena('editar')" style="cursor:pointer" align="center">Alterar Senha</td>
- <td width="10%" align="center">Excluir</td>
- </tr>
Advertisement
Add Comment
Please, Sign In to add comment