Ir para conteúdo
Fórum Script Brasil

ivan_bohne

Membros
  • Total de itens

    3
  • Registro em

  • Última visita

Posts postados por ivan_bohne

  1. postou 20 julho 2012 - 16:15

    Boa tarde,

    Preciso que quando clique no botão pesquisa, abra uma popup com a minha pesquisa e quando, clico no cliente desejado ele me traz o código do cliente e logo na frente do código o nome também.

    já consegui fazer isso mais esta abrindo uma popup em formato de janela, com o x para fechar e - para minimizar e até barra de endereços, quero que na minha tela de pesquisa abra somente a tela de pesquisa sem nada mais, o exemplo da que eu consegui na net esta ai mais não é do jeito que preciso.

    popup.html

    <script>
    function retorna(retorno)
            {
               window.opener.document.getElementById('codigo').value = retorno;
               window.self.close();
            }
    </script>
    
    <a href=java script:retorna('000001');>000001 - JOSE DA SILVA</a>
    index.html
    <script>
    function abrir(programa,janela)
    {
       if(janela=="") janela = "janela";
       window.open(programa,janela,'height=350,width=640');
    }
    </script>
    <body bgcolor=silver>
       <br>Cod. Cliente:<br>
       <input name='codigo' id='codigo'>
       <input type=button value='pesquisar' onClick=java script:abrir('popup.html');>

    quase isso só sem os botões e barra de navegação, tipo aqueles avisos que aparece em alguns sites.

    Qualquer ajuda e bem vinda desde já agradeço pessoal.

  2. Bom dia a todos estou precisando o seguinte fazer um update apenas em um botão conferido em uma lista de dados do banco ai em baixo vai o meu codigo

    <!DOCTYPE HTML>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; ISO-8859-1">
    <link rel="stylesheet" type="text/css" href="../estilos/estilos.css">
    <title>Documento sem t&iacute;tulo</title>
    </head>
    
    <body>
    <form name="form2" method="post" action="">
    <table width="614" border="1">
      <tr>
        <td width="316"><label for="pesquisa"></label>
          <input name="pesquisa" type="text" id="pesquisa" size="60">
          <input type="submit" name="Pesquisar" id="Pesquisar" value="Pesquisar"></td>
      </tr>
    </table>
    <?php
    
    
     require "../CONECTA/CONECTA.php"; 
     require "../CONECTA/funcoes.php";
    
    
    $sql = "
    SELECT TMOV_1.NUMEROMOV, TMOVCOMPL_1.PROT,
           TMOVITENS_1.CAMPOLIVRE, 
           TMOVCOMPL_1.SAFEWEB, FCFO_1.CODCFO, 
           FCFO_1.NOME, FCFO_1.CGCCFO, 
           FCFO_1.INSCRESTADUAL, TMOV_1.DATAEMISSAO, 
           TMOV_1.DATAEXTRA1, 
           TMOV_1.VALORTOTALPRODUTO 
           
    FROM TMOV TMOV_1 LEFT OUTER JOIN FCFO FCFO_1 ON 
         (FCFO_1.CODEMPRESA = TMOV_1.CODEMPRESA)
          AND (FCFO_1.CODCFO = TMOV_1.CODCFO)
          LEFT OUTER JOIN TMOVCOMPL TMOVCOMPL_1 ON 
         (TMOVCOMPL_1.IDMOV = TMOV_1.IDMOV)
          LEFT OUTER JOIN TMOVITENS TMOVITENS_1 ON 
         (TMOVITENS_1.CODEMPRESA = TMOV_1.CODEMPRESA)
          AND (TMOVITENS_1.IDMOV = TMOV_1.IDMOV)
    WHERE ( TMOV_1.CODTMV = '2.2.03' )
           AND ( TMOV_1.STATUS <> 'C' )
           AND ( TMOV_1.DATAEXTRA1 BETWEEN '02/01/2012' AND '02/29/2012' )
    ORDER BY TMOVCOMPL_1.PROT
    ";
    
    $resultado = ibase_query ( $conexao , $sql ); 
    while ( $row = ibase_fetch_object ( $resultado)) {  
    ?>
    
    <table width="880" border="0">
    <div class="grid">
    <tr>
      <td id="id" width="1" style="font-size:0px;"><?php echo $row->IDMOV; ?></td>
      <td width="17" style="font-size:10px;"  ><div align="left"><?php echo $row->NUMEROMOV; ?></div></td>
      <td width="100" style="font-size:11px;"  ><div align="left"><?php echo $row->PROT; ?></div></td>
      <td width="30"><input type="checkbox" name="conferido" id="conferido">
        <label for="conferido"></label></td>
      <td width="17" style="font-size:10px;" ><div align="left"><?php echo $row->CODCFO; ?></div></td>
      <td width="350" align="left" style="font-size:10px;" ><div align="left"><?php echo $row->NOME; ?>
      </div>
        <div align="left"></div></td>
      <td width="75"  style="font-size:10px;"><div align="left"><?php echo $row->CGCCFO; ?></div></td>
      <td width="50"  style="font-size:10px;"><div align="left"><?php echo $row->DATAEMISSAO; ?></div></td>
      <td width="50"  style="font-size:10px;"><div align="left"><?php echo $row->DATAEXTRA1; ?></div></td>
    </tr>
    </div>
    </table>
    <label for="ID"></label>
    <?php // Fechando conexao
    } 
    ibase_free_result ( $resultado ); 
    ibase_close ( $conexao ); 
    ?>
    <table width="879" border="0" class="grid">
      <tr>
        <td align="center">
    
          <input type="submit" name="Salvar" id="Salvar" value="salvar" >
          <input type="hidden" name="acao" value="
              
              <?php
    
            $conf = $_REQUEST['conf'];
            $sql2 = "insert into TMOVCOMPL (SAFEWEB) values (".$conf.")";
            $resultado = ibase_query($conexao, $sql2);
            ibase_close($conexao);
    
              ?>" />
        </td>
      </tr>
    </table>
    </form>
    </body>
    </html>

    Já esta listando os dados tudo ok só não estou conseguindo criar a pesquisa e o update do campo chekbos conferido exemplo se tiver marcado grava sim no banco se tiver desmarcado grava não.

×
×
  • Criar Novo...