Ir para conteúdo
Fórum Script Brasil

carvalho

Membros
  • Total de itens

    15
  • Registro em

  • Última visita

Posts postados por carvalho

  1. É só usar JS (head):

    <script type="text/javascript" language="JavaScript">
    function getCalendarDate()
    {
    var months = new Array(13);
    months[0] = "Janeiro";
    months[1] = "Fevereiro";
    months[2] = "Março";
    months[3] = "Abril";
    months[4] = "Maio";
    months[5] = "Junho";
    months[6] = "Julho";
    months[7] = "Agosto";
    months[8] = "Setembro";
    months[9] = "Outubro";
    months[10] = "Novembro";
    months[11] = "Dezembro";

    var now = new Date();
    var monthnumber = now.getMonth();
    var monthname = months[monthnumber];
    var monthday = now.getDate();
    var year = now.getYear();
    if(year < 2000) { year = year + 1900; }
    var dateString = monthday +
    ' de ' +
    monthname +
    ' de ' +
    year;
    return dateString;
    } // function getCalendarDate()

    function getClockTime()
    {
    var now = new Date();
    var hour = now.getHours();
    var minute = now.getMinutes();
    var second = now.getSeconds();
    var ap = "AM";
    if (hour > 11) { ap = "PM"; }
    if (hour > 12) { hour = hour - 12; }
    if (hour == 0) { hour = 12; }
    if (hour < 10) { hour = "0" + hour; }
    if (minute < 10) { minute = "0" + minute; }
    if (second < 10) { second = "0" + second; }
    var timeString = hour +
    ':' +
    minute +
    ':' +
    second +
    " " +
    ap;
    return timeString;
    }
    </script>
    [/CODEBOX]

    (body):

    [CODEBOX]
    &lt;script type="text/javascript" language="JavaScript">
    var calendarDate = getCalendarDate();
    var clockTime = getClockTime();
    document.write('' + calendarDate);
    document.write('<br>');
    document.write('' + clockTime);
    </script>

    Foi o que consegui editar pra ti :unsure:

    Agora, a respeito do posicionamento, especifique se você quer que fique fixo, ou se simplesmente, você vai colocar dentro duma div, ou table...

    Créditos: www.web-source.net

    Té mais!

    Eliseu, Boa tarde.

    funcionou agora preciso colocar isso em um determinado lugar na minha página tipo lado direito superior e vou fazer usando Table.

    Grato.

  2. Boa tarde.

    Gostaria de uma ajuda com o script abaixo. Gostaria de saber como faço para eliminar a imagem (uma seta) onde ocorre a ação de abrir e fechar o MENU, gostaria que isso fosse feito somente com ao clicar no texto (que fica na frente da imagem) para abrir e fechar o MENU.

    <link rel="stylesheet" href="/_css/intranet.css" type="text/css">
    <script language="Javascript" src="/_scripts/funcoes.js"></script>
    <script language="Javascript" src="/_scripts/menu.js"></script>



    <style type="text/css">
    body
    {
    font-size: 13px;
    font-family: Verdana, Arial, Helvetica, Garamond, sans-serif, serif;
    }

    div.menuWin
    {
    width: 100%;

    }

    div.menuWin a
    {
    display: block;
    padding-left: 3px;
    padding-right: 3px;
    margin: 0px;
    border: 0px;
    line-height: 20px;
    color: #000000;
    text-decoration: none;
    outline: none;
    }

    * html div.menuWin a { height: 1%; }

    div.menuWin a:hover
    {
    background-color: white;
    color: red;
    }

    ul.menuWin-body
    {
    margin: 12px;
    padding: 0px;
    width: 500px;
    }

    ul.menuWin-body li
    {
    display: block;
    margin: 0px;
    padding: 0px;
    list-style: none;
    clear: both;
    }

    ul.menuWin-body li div
    {
    width: 20px;
    float: right;
    margin: 5px;
    margin-right: 0px;
    padding: 0px;
    }

    ul.menuWin-body li img
    {
    margin: 0px;
    width: 16px;
    height: 16px;
    padding: 0px;
    border: 0px;
    vertical-align: middle;
    }

    span.menuWin-arrow
    {
    display: block;
    width: 20px;
    position : absolute;
    text-align: left;
    }

    span.menuWin-arrow img
    {
    padding: 3px 2px;
    cursor: pointer;
    width: 10px;
    height: 10px;
    }

    span.menuWin-header
    {
    display: block
    margin: 0px;
    padding: 0px;
    padding-left: 30px;
    line-height: 22px;
    color: black;
    font-weight: bold;
    background-color: white;
    }
    </body>
    </style>


    <script type="text/javascript" src="../_scripts/menu_windows3.js"></script>
    <script type="text/javascript">
    //<![CDATA[
    jQuery.noConflict();

    MenuWin = function(p,id,s)
    {
    var obj = this; // referência ao próprio objeto MenuWin
    var st = (typeof s != 'undefined' && s != null) ? s : false;
    var parent = document.getElementById(p); // objeto que será o container do menu
    var menu = document.createElement("div"); // o menu
    menu.setAttribute("id",id);
    menu.setAttribute((document.all)?"className":"class","menuWin");

    var header = document.createElement("span"); // cabeçalho do menu
    header.setAttribute((document.all)?"className":"class","menuWin-header");
    var headerText = null;

    var images = new Array(new Image(),new Image());
    images[0].src = "../_imagens/img_bullet-novo_up.gif";
    images[1].src = "../_imagens/img_bullet-novo_down.gif";

    var arrow = document.createElement("img"); // imagem para retrair e extender o menu
    arrow.setAttribute("alt","");
    arrow.setAttribute("title","");
    arrow.setAttribute("src",images[0].src);
    arrow.onclick = function()
    {
    if(this.getAttribute("src").indexOf("up") > -1)
    {
    this.setAttribute("src",images[1].src);
    jQuery("#"+body.getAttribute("id")).animate({height: "hide",opacity: "hide"},"fast");
    }
    else
    {
    this.setAttribute("src",images[0].src);
    jQuery("#"+body.getAttribute("id")).animate({height: "show",opacity: "show"},"slow");
    }
    }

    var arrowContainer = document.createElement("span"); // container da imagem que retrai e extende o menu
    arrowContainer.setAttribute((document.all)?"className":"class","menuWin-arrow");
    arrowContainer.appendChild(arrow);

    menu.appendChild(arrowContainer);
    menu.appendChild(header);

    var body = document.createElement("ul"); // corpo do menu
    body.setAttribute("id","menuWin-body-"+id);
    body.setAttribute((document.all)?"className":"class","menuWin-body");

    obj.state = function()
    {
    body.style.display = "none";
    arrow.setAttribute("src",images[1].src);
    };

    // função para setar o cabeçalho do menu
    this.setTitle = function(t)
    {
    headerText = document.createTextNode(t);
    header.appendChild(headerText);
    };

    // função para setar os itens do menu
    // recebe como parâmetros o texto, o link, o target e a imagem do item
    this.setItens = function(t,a,tg,i)
    {
    var li = document.createElement("li");
    var img = document.createElement("img");
    var link = document.createElement("a");
    var imgContainer = document.createElement("div");

    if(i != null)
    {

    img.setAttribute("src",i);
    img.setAttribute("title","");
    img.setAttribute("alt","");


    }

    link.appendChild(imgContainer);

    link.setAttribute("href",a);
    if(tg != null) link.setAttribute("target",tg);
    link.appendChild(document.createTextNode(t));

    li.appendChild(link);

    body.appendChild(li);
    };

    // esta função extende o container da image que retrai e extende o menu,
    // para manter alinhado o texto dos itens do menu.
    this.heightLine = function()
    {
    var linhas = body.getElementsByTagName("li");
    for(i = 0; i < linhas.length; i++)
    {
    while(linhas[i].getElementsByTagName("div")[0].offsetHeight < linhas[i].offsetHeight)
    linhas[i].getElementsByTagName("div")[0].style.height = linhas[i].offsetHeight+"px";
    }
    };

    // função para inserir na tela o menu
    this.draw = function()
    {
    if(headerText == null)
    {
    headerText = document.createTextNode("Menu");
    header.appendChild(headerText);
    }
    menu.appendChild(body);
    parent.appendChild(menu);

    obj.heightLine();
    if(st) obj.state();
    };


    };
    //]]>
    </script>[/codebox]

    Grato.

  3. Uhm... agora te entendi... bacana isso daí... até já imaginei como fazer... então...

    boa idéia...

    trabalhosinho... mas rola mesmo...

    bacana! valeu a dica!

    []'s Rafael Spilki

    Rafael, Boa tarde!

    É isso mesmo, quero que a busca ocorra dentro dos arquivos que estão nos diretórios. Sou iniciante nesse negócio, já ouvi falar de colocar METATAGno arquivo, mas não sei bem como funciona se poder me dizer faço com esse mesmo.

    Grato.

  4. Ólá, boa tarde a todos.

    Estou em total apuros. Tenho que colocar um sistema de busta interna na minha página é uma (INTRANET) e não consigo.

    è o seguinte tenho algumas informações que estão em arquivos .htm que inicialmente eram .doc, ou seja tenho basicamente um arquivo em word que foi salvo como .htm com os procedimentos que o meu funiconário tem que usar (falar) para atender o cliente.

    estes arquivos estão dentro de diretórios como por exemplo;

    material_cartoes\procedimentos\nome do arquivo com a informação (que antes era .doc e agora é .htm) por exemplo emissao.htm e é nele que eu quero que seja feita a busca.

    Quando eu digitar lá na página [emissao] o sistema tem que buscar em todos os arquivos .htm tudo que conter a palavra emissao.

    Já postei essa perguntas, mas acho que não fui claro. Também não posso usar os sistemas de busca tipo GOOGLE, pois como falei trata-se de uma INTRANET.

    Preciso muito disso, sou novato e tenho aprendido na marra estou até fazendo um curso de HTML que depois vou completar com CSS e Java, mas por agora não consigo.

    Estou postando no forum de ASP porque ouvi falar que este tipo de buscado so pode ser em ASP.

    Desde já muito obrigado.

  5. Se não me engano arquivo .stm é do exchange...

    Mas pra não ficarmos no achometro... Se infoma direitinho que fica mais facil pra você aplicar uma solução...

    Não sei se vai adiantar, mas troquei a extensão do arquivo para .HTML e rodou normalmente.

    Grato.

  6. Eu acho melhor você colocar o código da tabela pra eu dar uma olhada porque eu num entendi o desenhinho aí em cima kkkkkk.

    em relação a imagem existem dois atributos width="100" (largura da imagem) e height="100" (altura da imagem).

    <img src="imagem.gif" width="100" height="100" border="0" />
    Onde 100 é um valor em pixel você pode usar porcentagem (120%).
    Foi mal....kkkkk não achei que ia ficar daquele jeito. Segue.
    <table width=80%>
    <tr>
    <td>&nbsp;<font color=red size="5"><b>Soluções Online</b></font></td>
    </td>
    </tr>
    </table>
    <p>
    
    
    <tr>
    <td>
    <table width=60% height=20 align=left>
    
    <tr>
    <td bgcolor=red width=100%><font color=white size="3"><b>xxxxxxxxxxxxxxxxxxxxxx</b></font></td>
    </tr>
    <tr>  
    <td bgcolor=f6f6f6 align=center><a href="http:"><IMG src="xxxxx"></a></td>
    </tr>
    
    <td><table width=100%>
    
    <td><table width=100% align=left>
    
    <tr>
    <td bgcolor=red width=100%><font color=white size="3"><b>xxxxxxxxxxxxxxxxxxxxxx</b></font></td><p>
    </tr>
    <tr>
    <td align=center><a href="http:"><IMG src="xxxxx" height=104px width=210px></td>
    </tr>
    
    </td>
    </tr>
    </table>
    
    </td>
    
    </tr>
    </table>
    </table>
    
    
    
    <table border=1 bgcolor=f6f6f6 CELLSPACING=3 width=22% height=100% align=left>
    <td>
    <table width=100%>
    <tr>
    <td bgcolor="red" width=100%><img src="./././_imagens/ofolder.gif" width=16px height=16px valign=middle>&nbsp;<font color="white"><b>Acesso Rápido</font></b></td>
    </tr>
    <td>
    </table>
    <table>
    
    
    <b>
    <head>                
    <style>
    td div {width: 100%; height: 145; overflow: auto;}                    
    </style>
    </head>
    <div>
    <br>        
    <a href="http:"><font color=black>xxxxxxxxxxxxxxxxx</a>
    <img src="/_imagens/img_divide2.gif">
    <a href="http:"><font color=black>xxxxxxxxxxxxxxxxx</a>
    <img src="/_imagens/img_divide2.gif">
    <a href="http:"><font color=black>xxxxxxxxxxxxxxxxx</a>
    <img src="/_imagens/img_divide2.gif">
    <a href="http:"><font color=black>xxxxxxxxxxxxxxxxx</a>
    <img src="/_imagens/img_divide2.gif"> 
    <a href="http:"><font color=black>xxxxxxxxxxxxxxxxx</a>
    <img src="/_imagens/img_divide2.gif">
    <a href="http:"><font color=black>xxxxxxxxxxxxxxxxx</a>
    <img src="/_imagens/img_divide2.gif">
    <a href="http:"><font color=black>xxxxxxxxxxxxxxxxx</a>
    <img src="/_imagens/img_divide2.gif">
    <a href="http><font color=black>xxxxxxxxxxxxxxxxxxx</a>
    <img src="/_imagens/img_divide2.gif">
    <a href="http:"><font color=black>xxxxxxxxxxxxxxxxx</a>                 
    <img src="/_imagens/img_divide2.gif">
    <a href="http:"><font color=black>xxxxxxxxxxxxxxxxx</a>  
    <img src="/_imagens/img_divide2.gif">
    <a href="http:"><font color=black>xxxxxxxxxxxxxxxxx</a>
    <img src="/_imagens/img_divide2.gif">
    </b>
    </div>
    </td>
    </table>
    
    
    <tr>
    <td>
    <table width=100%>
    <tr>
    <td bgcolor="red" width=100%><img src="./././_imagens/ofolder.gif" width=16px height=16px valign=middle>&nbsp;<font color="white"><b>Outros</font></b></td>
    </tr>
    <td>
    </table>
    
    
    <b>
    <head>                
    <style>
    td div {width: 100%; height: %; overflow: auto;}                    
    </style>
    </head>
    <div>
    <br>        
    <a href="arquivos/lista_aniversariantes.xls"><font color=black>xxxxxxxxxx</a>
    <img src="/_imagens/img_divide2.gif">
    <a href="http:"><font color=black>Manual de Conduta</a> 
    <img src="/_imagens/img_divide2.gif">
    <a href=""><font color=black>Telefones e Ramais</a> 
    <img src="/_imagens/img_divide2.gif">
    <a href=""><font color=black>xxxxxxxxxxxxxxxx</a>
    <img src="/_imagens/img_divide2.gif">
    </b>
    </div> 
    </td>
    </tr> 
    </table>
    
    
    
    
    <tr>
    <table border=1 bgcolor=f6f6f6 CELLSPACING=3 width=100% align=left>
    <tr>
    <td>
    <table width="100%">
    <tr>
    <td bgcolor="red" width=100%>
    <img src="./././_imagens/maisrecentes.gif" valign=middle>&nbsp;<font size=2 color="white"><b>Publicações + Recentes</font></b></td>
    </tr>
    <td>
    </table>
    
    
    
    <b>
    <div>
    <br>
    
    <table width="10%">
    <tr>
    <td bgcolor="red" width="100%">
    <font color="white"><b><center>21/08/2008</center></font></b></td>
    </tr>
    </table>
    
    <img src="./././_imagens/img_seta.gif" valign=middle>&nbsp;<a href="http:">xxxxxxxxxxxxxxxxxxxxxxxxxxxx</a><p>
    
    <table width="10%">
    <tr>
    <td bgcolor="red" width="100%">
    <font color="white"><b><center>20/08/2008</center></font></b></td>
    </tr>
    </table>
    
    <img src="./././_imagens/img_seta.gif" valign=middle>&nbsp;<a href="http:">xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</a><p>
    
    
    <table width="10%">
    <tr>
    <td bgcolor="red" width="100%">
    <font color="white"><b><center>19/08/2008</center></font></b></td>
    </tr>
    </table>
    
    <img src="./././_imagens/img_seta.gif" valign=middle>&nbsp;<a href="http:">xxxxxxxxxxxxxxxxx</a><p>
    
    <img src="./././_imagens/img_seta.gif" valign=middle>&nbsp;<a href="http:">xxxxxxxxxxxxxxxxx</a><p>
    
    <img src="./././_imagens/img_seta.gif" valign=middle>&nbsp;<a href="http:">xxxxxxxxxxxxxxxx</a><p>
    
    <img src="./././_imagens/img_seta.gif" valign=middle>&nbsp;<a href="http:">xxxxxxxxxxxxxxxx</a><p>
    
    <img src="./././_imagens/img_seta.gif" valign=middle>&nbsp;<a href="http:">xxxxxxxxxxxxxxxx</a><p>
    
    <img src="./././_imagens/img_seta.gif" valign=middle>&nbsp;<a href="http:">xxxxxxxxxxxxxxxx</a><p>
    
    <img src="./././_imagens/img_seta.gif" valign=middle>&nbsp;<a href="http:">xxxxxxxxxxxxxxxx</a><p>
    
    <img src="./././_imagens/img_seta.gif" valign=middle>&nbsp;<a href="http:">xxxxxxxxxxxxxxxx</a><p>
    
    <img src="./././_imagens/img_seta.gif" valign=middle>&nbsp;<a href="http:">xxxxxxxxxxxxxxxx</a><p>
    
    <img src="./././_imagens/img_seta.gif" valign=middle>&nbsp;<a href="http:">xxxxxxxxxxxxxxxx</a><p>
    
    
    <table width="10%">
    <tr>
    <td bgcolor="red" width="100%">
    <font color="white"><b><center>18/08/2008</center></font></b></td>
    </tr>
    </table>
    
    <img src="./././_imagens/img_seta.gif" valign=middle>&nbsp;<a href="http:">xxxxxxxxxxxxxxx</a><p>
    
    <img src="./././_imagens/img_seta.gif" valign=middle>&nbsp;<a href="http:">xxxxxxxxxxxxxxx</a><p>                            
    
    
    </html>

    Grato.

  7. Qual a extenção das suas paginas?

    Bom, o arquivo que eu faço as alterações é Default.stm e tudo dentro dele é HTML.

    Os scripts ficam dentro de diretórios como por exemplo;

    pasta1/pasta2/pasta3/aqui ficam as pastas que esse Default.stm chama;

    materialcartões/procedimentos/ai vem vários arquivos .HTM que eram .DOC

    basicamente uso este .STM e os .HTM

    Grato.

  8. Socorro!!!!

    Estou tentando alinhar algumas tabelas onde na 1º linha tenho 3 tabelas sendo a 1º e 2º do mesmo tamanho tanto W como H e a 3º com H diferente, até ai tudo bem.

    O problema começa mesmo quando tento colocar duas uma novas tabelas debaixo da primeira linha sem entortar a "maltida" colona 3.

    Como exemplo;

    ________________________ ___________________

    | | | |

    | | | |

    | Assunto1 | Assunto2 | |

    | | | Assunto3 |

    |__________| ____________| esta é dividida em 2 |

    ________________________ | |

    | || - - - - - - - - - - - - - |

    | || e cada uma tem |

    | Assunto4 || um scroll |

    | || |

    |______________________| | |

    | |

    aqui vai mais uma |___________________|

    tabela igual a 4

    aproveitando gostaria de saber se tem alguma tag para bloquear o tamanho de uma figura, pois quando coloco uma figura na tabela "assunto1" por exemplo ela desconfigura todas as outras. Seria o comanto ABSOLUT?

    Grato.

  9. Então agora complicou geralmente contador de visitas usa banco de dados e alguma linguagem de programação, e se o seu site fosse online até dava pra usar alguns serviços online gratuito. Para o seu caso a única solução que me passa pela cabeça é fazer um contador com base em um cookie implantado na máquina do usuário, por exemplo, se seu site ficar em apenas uma máquina da pra saber quantos usuários acessaram pela aquela máquina.

    Abaixa temos um código javascript que você coloca no head da sua página que vai criar um cookie e utiliza-lo para a contagem, e o segundo script fica no corpo da página para exibir na tela a contagem:

    <html>
    <head>
        <title>cookies - contador de visitas</title>
        <style>
            body, p, div, td, input, select, textarea {
                font-family: verdana,arial,helvetica;
                font-size:10px;
                color:#27364D;
                text-decoration: none;
            }
            input,textarea {
                @if (is.ie) {
                    color: #efefef; background-color:#efefef; border: 1px solid #060606;
                    /*border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; */
                }
            }
            textarea { overflow:auto }
        </style>
        &lt;script LANGUAGE="JavaScript">
    <!--
    // name - name of the cookie
    // value - value of the cookie
    // [expires] - expiration date of the cookie (defaults to end of current session)
    // [path] - path for which the cookie is valid (defaults to path of calling document)
    // [domain] - domain for which the cookie is valid (defaults to domain of calling document)
    // [secure] - Boolean value indicating if the cookie transmission requires a secure transmission
    // * an argument defaults when it is assigned null as a placeholder
    // * a null placeholder is not required for trailing omitted arguments
    function setCookie(name, value, expires, path, domain, secure) {
        var curCookie = name + "=" + escape(value) +
        ((expires) ? "; expires=" + expires.toGMTString() : "") +
        ((path) ? "; path=" + path : "") +
        ((domain) ? "; domain=" + domain : "") +
        ((secure) ? "; secure" : "");
        document.cookie = curCookie;
    }
    // name - name of the desired cookie
    // * return string containing value of specified cookie or null if cookie does not exist
    function getCookie(name) {
        var dc = document.cookie;
        var prefix = name + "=";
        var begin = dc.indexOf("; " + prefix);
        if (begin == -1) {
            begin = dc.indexOf(prefix);
        if (begin != 0) return null;
        } else
            begin += 2;
        var end = document.cookie.indexOf(";", begin);
        if (end == -1)
            end = dc.length;
        return unescape(dc.substring(begin + prefix.length, end));
    }
    // name - name of the cookie
    // [path] - path of the cookie (must be same as path used to create cookie)
    // [domain] - domain of the cookie (must be same as domain used to create cookie)
    // * path and domain default if assigned null or omitted if no explicit argument proceeds
    function deleteCookie(name, path, domain) {
        if (getCookie(name)) {
            document.cookie = name + "=" + 
            ((path) ? "; path=" + path : "") +
            ((domain) ? "; domain=" + domain : "") +
            "; expires=Thu, 01-Jan-70 00:00:01 GMT";
            history.go(0);
        }
    }
    // date - any instance of the Date object
    // * hand all instances of the Date object to this function for "repairs"
    function fixDate(date) {
        var base = new Date(0);
        var skew = base.getTime();
        if (skew > 0)
            date.setTime(date.getTime() - skew);
        }
    // -->
    </SCRIPT>
    </head>
    <body leftmargin="10" topmargin="10" marginwidth="10" marginheight="10">
    <h1>COOKIES</h1>
    &lt;script LANGUAGE="JavaScript">
    <!--
    var now = new Date();
    fixDate(now);
    now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000);
    var visits = getCookie("counter");
    if (!visits) {
        visits = 1;
        document.write("A proposito esta e' a sua primeira vez por aqui.");
    } else {
        visits = parseInt(visits) + 1;
        document.write("A proposito voce já' esteve aqui " + visits + " vezes.");
    }
    setCookie("counter", visits, now);
    // -->
    </SCRIPT>
    
    </body>
    </html>

    Cara muito bom, muito obrigado. Não sei como, mas agora vou tentar colocar isso de forma tal que eu consiga medir quantas X um determinado material (script) foi acessado pelos atendentes.

    Grato.

  10. Já que é Intranet qual sistema você está usando o Apache ou o iis ou é local mesmo tipo os arquivos

    abrem pelo protocolo FILE://?

    Nossa! nem acredito! cara muito obrigado por ler a minha pergunta.

    Bom, é o seguinte, não manjo quase nada e o pouco que aprendi foi na marra, pois assumi a responsabilidade desta página mesmo sem saber absolutamente nada de HTML (aprendi lendo tutoriais, meio auto-didata)e tive que me virar, sabe como é.

    Não sei responder a sua pergunta, mas preciso muito disso, pois sou um p.boca quande e acabei falando que saberia colocar a tal funcionalidade na página.

    mesmo assim muuuuito grato, muito mesmo.

×
×
  • Criar Novo...