aquilesmaior

Como abrir script na div conteudo

Aug 13th, 2012
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.40 KB | None | 0 0
  1. <script type="text/javascript">
  2. function Filtro(){
  3.         if(document.getElementById('filtro').style.display == 'none'){
  4.             document.getElementById('filtro').style.display='';
  5.             document.getElementById('pesquisa').focus();
  6.         }else
  7.             document.getElementById('filtro').style.display='none';
  8.     }
  9.     function Filtrar(){
  10.         if(document.getElementById('nome').checked)
  11.             document.form1.campofiltro.value = document.getElementById('nome').value;
  12.         else   
  13.         if(document.getElementById('codigo').checked)
  14.             document.form1.campofiltro.value = document.getElementById('codigo').value;        
  15.         else   
  16.         if(document.getElementById('cnpj').checked)
  17.             document.form1.campofiltro.value = document.getElementById('cnpj').value;          
  18.            
  19.         document.form1.textopesquisa.value = document.getElementById('pesquisa').value;
  20.        
  21.         document.getElementById('acao').value='Filtrar';
  22.         document.form1.submit();
  23.     }
  24.     function Todos(){
  25.         document.form1.textopesquisa.value = '%';
  26.         document.getElementById('acao').value='Filtrar';
  27.         document.form1.submit();       
  28.     }
  29.     function Excluir(cod){
  30.         if(confirm('Deseja excluir registro?')){
  31.  
  32.             document.getElementById('acao').value='Excluir';
  33.             document.getElementById('cod').value=cod;
  34.  
  35.             document.form1.submit();
  36.         }      
  37.     }
  38.    
  39.     function AltSenha(cod){
  40.        
  41.             document.getElementById('acao').value='AltSenha';
  42.             document.getElementById('cod').value=cod;
  43.    
  44.             document.form1.submit();   
  45.     }  
  46.    
  47.     function Pagina(i){
  48.         document.form1.hpag.value = i;             
  49.                                 document.form1.acao.value = "";
  50.         document.form1.submit();
  51.     }
  52.     function Ordena(campo){
  53.         if(campo==document.form1.campoordem.value){
  54.             if((document.form1.contordem.value == '')|| (document.form1.contordem.value == 1)){
  55.                 document.form1.acao.value = 'Filtrar';
  56.                 document.form1.contordem.value = 2;
  57.                 document.form1.campoordem.value = campo;
  58.                 document.form1.submit();               
  59.             }else
  60.             if(document.form1.contordem.value == 2){
  61.  
  62.                 document.form1.contordem.value = 1;
  63.                 document.form1.campoordem.value = campo;
  64.                 document.form1.acao.value = 'Filtrar';
  65.                 document.form1.submit();
  66.             }
  67.         }else{
  68.                 document.form1.contordem.value = 2;
  69.                 document.form1.campoordem.value = campo;
  70.                 document.form1.acao.value = 'Filtrar';
  71.                 document.form1.submit();
  72.         }
  73.  
  74.     }
  75. </script>
  76.  
  77. <....>
  78.  
  79.  
  80. <div class="botao_buscar">
  81. <a href="#"  onclick="Filtrar()" name="botao" value="Filtrar" id="botao_buscar" style="color:#FFF; text-shadow: black 0.1em 0.1em 0.2em;">&nbsp; &nbsp;Buscar<img src="imagens/lupa.png" style="float: right;" border="0"></a>
  82. </div>
  83.  
  84.  
  85.                 </td>
  86.             <!-- Fim Oculta Filtro --> 
  87.             </tr>
  88.         </table>
  89.        
  90.        
  91. <table class="style4" width="100%" cellpadding="0" cellspacing="0">
  92.   <tr class="titulo"><!-- Colunas da tabela -->
  93.  <td width="8%" onclick="JavaScript:Ordena('codigo')" style="cursor:pointer" align="center">C&oacute;digo</td>
  94.                     <td width="37%" onclick="JavaScript:Ordena('nome')" style="cursor:pointer">Nome</td>
  95.                     <td width="35%" onclick="JavaScript:Ordena('email')" style="cursor:pointer">Email</td>
  96.                     <td width="5%" onclick="JavaScript:Ordena('editar')" style="cursor:pointer" align="center">Editar</td>
  97.                     <td width="10%" onclick="JavaScript:Ordena('editar')" style="cursor:pointer" align="center">Alterar Senha</td>
  98.                     <td width="10%" align="center">Excluir</td>
  99.                 </tr>
Advertisement
Add Comment
Please, Sign In to add comment