Visualizzazione dei risultati da 1 a 6 su 6

Discussione: Aiuto codice html

  1. #1
    Utente di HTML.it
    Registrato dal
    May 2007
    Messaggi
    146

    Aiuto codice html

    Salve, non sono esperto di codice html ma volevo inserire questo script nel mio sito ma non capisco perchè il codice non funziona, ecco ora ve lo mostro:
    codice:
    HTML>
     <HEAD>
       <TITLE> INCONTRO </TITLE>
     </HEAD>
    <BODY>
    <script language="JavaScript1.2">
    //Specify the marquee's width (in pixels)
    var marqueewidth=330
    //Specify the marquee's height
    var marqueeheight=150
    //Specify the marquee's scroll speed (larger is faster)
    var speed=1
    //Specify the marquee contents
    var marqueecontents='<center><center><font face="Comic Sans MS">[b]SABATO 20 NOVEMBRE TORRE CONTRO PIOBBICO 90'
    
    if (document.all){
    document.write('<marquee direction="up" scrollAmount='+speed+' style="width:'+marqueewidth+';height:'+marqueeheight+'">'+marqueecontents+'</marquee>')}
    else if(document.layers){
    document.write('<ilayer id="cmarquee01" width="'+marqueewidth+'" height="'+marqueeheight+'"><layer id="cmarquee02" width="'+marqueewidth+'" height="'+marqueeheight+'"></layer></ilayer>')}
    
    function regenerate(){
    window.location.reload()
    }
    function regenerate2(){
    if (document.layers){
    setTimeout("window.onresize=regenerate",450)
    intializemarquee()
    }
    }
    
    function intializemarquee(){
    document.cmarquee01.document.cmarquee02.document.write(marqueecontents)
    document.cmarquee01.document.cmarquee02.document.close()
    thelength=document.cmarquee01.document.cmarquee02.document.height
    scrollit()
    }
    
    function scrollit(){
    if (document.cmarquee01.document.cmarquee02.top>=thelength*(-1)){
    document.cmarquee01.document.cmarquee02.top-=speed
    setTimeout("scrollit()",100)
    }
    else{
    document.cmarquee01.document.cmarquee02.top=marqueeheight
    scrollit()
    }
    }
    
    window.onload=regenerate2
    // --> 
    </script>
    </BODY>
    </HTML>

  2. #2
    Andrebbe postato in Javascript. Attenzione al titolo!!! Comunque, credo che hai sbaglaito a copiare a qua, perchè altrimenti l'errore sarebbe nella prima riga:

    Corretto:
    codice:
    <html>


  3. #3
    Utente di HTML.it
    Registrato dal
    May 2007
    Messaggi
    146
    ma perchè è codice in javascript? ho messo il < ma nulla....

  4. #4
    E' javascript perchè questa parte:

    codice:
    <script language="JavaScript1.2">
    //Specify the marquee's width (in pixels)
    var marqueewidth=330
    //Specify the marquee's height
    var marqueeheight=150
    //Specify the marquee's scroll speed (larger is faster)
    var speed=1
    //Specify the marquee contents
    var marqueecontents='<center><center><font face="Comic Sans MS">[b]SABATO 20 NOVEMBRE TORRE CONTRO PIOBBICO 90'
    
    if (document.all){
    document.write('<marquee direction="up" scrollAmount='+speed+' style="width:'+marqueewidth+';height:'+marqueeheight+'">'+marqueecontents+'</marquee>')}
    else if(document.layers){
    document.write('<ilayer id="cmarquee01" width="'+marqueewidth+'" height="'+marqueeheight+'"><layer id="cmarquee02" width="'+marqueewidth+'" height="'+marqueeheight+'"></layer></ilayer>')}
    
    function regenerate(){
    window.location.reload()
    }
    function regenerate2(){
    if (document.layers){
    setTimeout("window.onresize=regenerate",450)
    intializemarquee()
    }
    }
    
    function intializemarquee(){
    document.cmarquee01.document.cmarquee02.document.write(marqueecontents)
    document.cmarquee01.document.cmarquee02.document.close()
    thelength=document.cmarquee01.document.cmarquee02.document.height
    scrollit()
    }
    
    function scrollit(){
    if (document.cmarquee01.document.cmarquee02.top>=thelength*(-1)){
    document.cmarquee01.document.cmarquee02.top-=speed
    setTimeout("scrollit()",100)
    }
    else{
    document.cmarquee01.document.cmarquee02.top=marqueeheight
    scrollit()
    }
    }
    
    window.onload=regenerate2
    // --> 
    </script>
    E' JavaScript!!!

    Comuqnue ti converrebbe dare prima un'occhiata alle guide su html, js e css per poter capire + o - il codice di una pagina.

  5. #5
    Utente di HTML.it
    Registrato dal
    May 2007
    Messaggi
    146
    Si ma io lo posso usare come codice per il mio sito fatto con joomla? nel senso è giusto il codice?

  6. #6
    Io me ne intendo poco di js, però visto che credo che tutto quel codice serva a dare un risultato (che a me non da), credo sia errato, comunque cosa doveva fare? Ti conviene chiedere a un moderatore di spostarti in js

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.