Visualizzazione dei risultati da 1 a 2 su 2
  1. #1

    Errore Script per abbellimento testo!

    Ho scaricato dalla vostra sezione DOWNLOAD questo JS per ravvivare le scritte dei testi:

    <script>
    <!--

    var from = 1;
    var to = 8;

    var delay = 70;

    var glowColor = "#0099ff";

    var i = to;
    var j = 0;

    textPulseDown();

    function textPulseUp()
    {
    if (!document.all)
    return
    if (i < to)
    {
    theText.style.filter = "Glow(Color=" + glowColor + ", Strength=" + i + ")";
    i++;
    theTimeout = setTimeout('textPulseUp()',delay);
    return 0;
    }

    if (i = to)
    {
    theTimeout = setTimeout('textPulseDown()',delay);
    return 0;
    }


    }

    function textPulseDown()
    {
    if (!document.all)
    return
    if (i > from)
    {
    theText.style.filter = "Glow(Color=" + glowColor + ", Strength=" + i + ")";
    i--;
    theTimeout = setTimeout('textPulseDown()',delay);
    return 0;
    }

    if (i = from)
    {
    theTimeout = setTimeout('textPulseUp()',delay);
    return 0;
    }
    }

    //-->
    </script>


    Ho anche inserito il relativo testo e collegamento al JS nell'apposita sezione :

    <span id="theText" style="width:100%">
    <h2>CIAO A TUTTI</h2>
    </span>

    ,ma IE contienua a farmi errori di DEBUG dicendomi che la variabile "theText" non è dichiarata.

    sapete dirmi il motivo? Grazie
    D.League Official WebSite
    http://xoomer.virgilio.it/d-league

  2. #2
    Utente di HTML.it L'avatar di Francis87
    Registrato dal
    Jun 2003
    Messaggi
    5,970
    prova a metteci in alto:

    codice:
    var theText = document.getElementById("theText");
    Heaven's closed. Hell sold out.

    Linux 2.6.26-2-amd64
    Debian squeeze

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.