Ir para conteúdo
Fórum Script Brasil

fercosmig

Moderadores
  • Total de itens

    4.048
  • Registro em

  • Última visita

Posts postados por fercosmig

  1. <script language="JavaScript">

    <!--

    function abrepopup(){

    if(document.abcd.one.value == '1'){

    window.open('http://www.google.com','','_blank');

    }else{

    window.open('http://www.gmail.com','','_blank');

    }

    }

    //-->

    </script>

    <form name="abcd">

    <select name="one" size="1" onChange="abrepopup();">

    <option selected>::: Sites :::</option>

    <option value="1">site1</option>

    <option value="2">site2</option>

    </select>

    </form>

    assim funciona!

    abraços

  2. <body onload="JavaScript:window.open('arquivo.xls')">

    opa, desde que exista o arquivo, se você fizer assim o windows vai perguntar se você quer abrir ou salvar o mesmo.

    se o arquivo não existir vai dar erro!

    abraços

    ----- edited -----

    do lado Client-Side não encontrei nada sobre Excel e Javascript.

    abraços

  3. if (screen.width==1280 && screen.height==1024)

    {var arquivo = '1280x1024.css'}

    if (screen.width==1280 && screen.height==960)

    {var arquivo = '1280x960.css'}

    if (screen.width==1280 && screen.height==768)

    {var arquivo = '1280x768.css'}

    if (screen.width==1280 && screen.height==720)

    {var arquivo = '1280x720.css'}

    if (screen.width==1152 && screen.height==864)

    {var arquivo = '1152x864.css'}

    if (screen.width==1024 && screen.height==768)

    {var arquivo = '1024x768.css'}

    if (screen.width==848 && screen.height==480)

    {var arquivo = '848x480.css'}

    if (screen.width==800 && screen.height==600)

    {var arquivo = '800x600.css'}

    if (screen.width==640 && screen.height==480)

    {var arquivo = '640x480.css'}

    document.write ('<link href="' + arquivo + '" rel="stylesheet" type="text/css"/>');

    acho que assim funciona do jeito que você precisa!

    abraços

  4. <script>

    var indice=1;

    function ShowMore() {

    newDiv = document.createElement("DIV");

    newDiv.id = "AdditionalContent";

    newInput1 = document.createElement("INPUT");

    newInput1.type = "text";

    newInput1.name = "item" + indice;

    newInput1.value = newInput1.name;

    indice=indice+1;

    newInput2 = document.createElement("INPUT");

    newInput2.type = "text";

    newInput2.name = "item" + indice;

    newInput2.value = newInput2.name;

    indice=indice+1;

    newInput3 = document.createElement("INPUT");

    newInput3.type = "text";

    newInput3.name = "item" + indice;

    newInput3.value = newInput3.name;

    indice=indice+1;

    newText = document.createTextNode("Outra Linha");

    newDiv.insertBefore(newText, null);

    newDiv.insertBefore(newInput1, null);

    newDiv.insertBefore(newInput2, null);

    newDiv.insertBefore(newInput3, null);

    document.getElementById("InitialContent").insertBefore(newDiv, null);

    }

    </script>

    coloquei o valor no value somente para você ver quando fizer um teste! é sotirar as linhas:

    newInput1.value = newInput1.name;

    abraços

  5. <table>

    <tr id="linha" style="background-color: #0000ff;">

    <td><input type="checkbox" onclick="if(document.getElementById('linha').style.background == '#009900'){document.getElementById('linha').style.background = '#0000ff';}else{document.getElementById('linha').style.background = '#009900';}">XR 200R</td>

    </tr></table>

    assim funciona!

    abraços

×
×
  • Criar Novo...