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

    Script per pulsante lampeggiante

    Vorrei creare un pulsante rosso lampeggiante. Per quale ragione questo script non funziona su tutti i browser ma solo su crome e safari? Sapreste risolvere questo problema mantenendo validato il codice?

    PAGINA:

    http://www.ubaldogulotta.eu/index.html

    SCRIPT:

    codice:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Documento senza titolo</title>
    <style type="text/css"> 
    body a:link {color: #0080FF;}    /* unvisited link */
    body a:visited {color:#0080FF;} /* visited link */
    body a:hover {color:#0080FF;}   /* mouse over link */
    body a:active {color:#0080FF;}  /* selected link */
    </style>
    <script language="JavaScript" type="application/javascript">
    var Velocita = 150; // Inserite qui la Velocita' di Lampeggiamento
    var Colore1 = 'white'; // Inserite qui il Primo Colore (in inglese)
    var Colore2 = 'red'; // Inserite qui il Secondo Colore (in inglese)
    var NomePaginaWeb = 'http://www.ubaldogulotta.eu/index.html'; // Inserisci qui l'Indirizzo web o loa pagina web da visualizzare quando si clicca sul Pulsante
    function Lampeggio() {
       (document.all.PULS1.style.backgroundColor==Colore2)? document.all.PULS1.style.backgroundColor=Colore1: document.all.PULS1.style.backgroundColor=Colore2;
       setTimeout('Lampeggio()', Velocita)
    						}
    function Vai() { document.URL = NomePaginaWeb; }
    </script>
    </head>
    <body bgcolor="#FFFFFF" onload=Lampeggio()>
    <h1>Su questo dominio sono stati installati i seguenti software di community:</h1>
    
    <form name="form1" action="http://www.ubaldogulotta.eu/index.html">
      <div align="center">
        <input type="button" name="PULS1" value="FAI IL REFLESH CON IL TUO BROWSER! PAGINA IN COSTRUZIONE!" style="background-color:red;" onclick=Vai()/>
      </div>
    </form>
    </body>
    </html>
    Grazie mille
    MySpace:
    http://www.myspace.com/550584979
    My new personal web site:
    http://www.ubaldogulotta.eu/

  2. #2
    Moderatore di Annunci siti web, Offro lavoro/collaborazione, Cerco lavoro L'avatar di cavicchiandrea
    Registrato dal
    Aug 2001
    Messaggi
    26,131
    Ho apportato alcune modifiche, e alzato il tempo del setTimeout
    codice:
    <html>
    <head>
    <meta content="text/html; charset=ISO-8859-1"
    http-equiv="content-type">
    <title>test</title>
    <script language="JavaScript" type="application/javascript">
    var Velocita = 1000; // Inserite qui la Velocita' di Lampeggiamento
    var Colore1 = 'white'; // Inserite qui il Primo Colore (in inglese)
    var Colore2 = 'red'; // Inserite qui il Secondo Colore (in inglese)
    var NomePaginaWeb = 'http://www.ubaldogulotta.eu/index.html'; // Inserisci qui l'Indirizzo web o loa pagina web da visualizzare quando si clicca sul Pulsante
    function Lampeggio() {
    (document.getElementById("PULS1").style.backgroundColor=='red')? document.getElementById("PULS1").style.backgroundColor=Colore1: document.getElementById("PULS1").style.backgroundColor=Colore2;
    setTimeout(function(){Lampeggio()}, Velocita)
    }
    function Vai() { document.URL = NomePaginaWeb; }
    </script>
    </head>
    <body style="background-color: rgb(255, 255, 255);" onload="Lampeggio()">
    <h1>Su questo dominio sono stati installati i seguenti software di
    community:</h1>
    
    
    <form name="form1" action="http://www.ubaldogulotta.eu/index.html">
    <div align="center"> <input name="PULS1" id="PULS1"
    value="FAI IL REFLESH CON IL TUO BROWSER! PAGINA IN COSTRUZIONE!"
    style="background-color: red;" onclick="Vai()/" type="button"> </div>
    </form>
    </body>
    </html>
    Cavicchi Andrea
    Problemi con javascript, jquery, ajax clicca qui

  3. #3
    Già meglio però ancora non lo vedo funzionare su IE e Opera e non é validato...

    Questo qui sotto é validato ma ha lo stesso problema... Non funziona su IE e Opera...

    codice:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Documento senza titolo</title>
    <style type="text/css"> 
    body a:link {color: #0080FF;}    /* unvisited link */
    body a:visited {color:#0080FF;} /* visited link */
    body a:hover {color:#0080FF;}   /* mouse over link */
    body a:active {color:#0080FF;}  /* selected link */
    </style>
    <script language="JavaScript" type="application/javascript">
    var Velocita = 1000; // Inserite qui la Velocita' di Lampeggiamento
    var Colore1 = 'white'; // Inserite qui il Primo Colore (in inglese)
    var Colore2 = 'red'; // Inserite qui il Secondo Colore (in inglese)
    var NomePaginaWeb = 'http://www.ubaldogulotta.eu/index.html'; // Inserisci qui l'Indirizzo web o loa pagina web da visualizzare quando si clicca sul Pulsante
    function Lampeggio() {
    (document.getElementById("PULS1").style.backgroundColor=='red')? document.getElementById("PULS1").style.backgroundColor=Colore1: document.getElementById("PULS1").style.backgroundColor=Colore2;
    setTimeout(function(){Lampeggio()}, Velocita)
    }
    function Vai() { document.URL = NomePaginaWeb; }
    </script>
    </head>
    <body style="background-color: rgb(255, 255, 255);" onload="Lampeggio()">
    <h1>Su questo dominio sono stati installati i seguenti software di
    community:</h1>
    
    <div align="center">
    <form name="form1" action="http://www.ubaldogulotta.eu/index.html">
    <input name="PULS1" id="PULS1"
    value="FAI IL REFLESH CON IL TUO BROWSER! PAGINA IN COSTRUZIONE!"
    style="background-color: red;" onclick="Vai()/" type="button"/> 
    </form>
    </div>
    </body>
    </html>
    Comunque bravo, gia molto meglio...
    MySpace:
    http://www.myspace.com/550584979
    My new personal web site:
    http://www.ubaldogulotta.eu/

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 © 2024 vBulletin Solutions, Inc. All rights reserved.