Visualizzazione dei risultati da 1 a 2 su 2

Discussione: Script status bar

  1. #1

    Script status bar

    Buongiorno a tutti, ho un problema di questo genere, ho inserito questo script nella mia home page però non mi funziona o meglio non parte, mentre se lo metto in una pagina nuova và alla grande.Quakcuno mi dice come mai, probabilmente mi manca qualcosa per farlo partire in una pagina gia pronta o compilata:
    <html>

    <head>
    <title>Messaggio sulla status bar con effetto macchina da scrivere</title>
    <script LANGUAGE="JavaScript">

    var speed = 100
    var pause = 1000
    var timerID = null
    var texttype = false
    var ar = new Array()

    ar[0] = "Rtr.it - centro assistenza tecnica audio-video"
    ar[1] = "Riparazioni tvcolor, vcr, hifi, carstereo, e installazioni antenne"
    ar[2] = "ed inoltre vendita computer, accessori, decoder satellitari , etc..."

    var msgnow = 0
    var offset = 0

    function stopBanner() {
    if (texttype)
    clearTimeout(timerID)
    texttype = false
    }

    function startBanner() {
    stopBanner()
    showBanner()
    }

    function showBanner() {
    var text = ar[msgnow]

    if (offset < text.length) {
    if (text.charAt(offset) == " ")
    offset++

    var partialMessage = text.substring(0, offset + 1)
    window.status = partialMessage
    offset++
    timerID = setTimeout("showBanner()", speed)
    texttype = true
    } else {
    offset = 0
    msgnow++
    if (msgnow == ar.length)
    msgnow = 0

    timerID = setTimeout("showBanner()", pause)
    texttype = true
    }
    }

    </script>
    </head>

    <body onLoad="startBanner()">
    </body>
    </html>

    Grazie.

  2. #2
    Fai così: copia sto codice
    codice:
    <script LANGUAGE="JavaScript"> 
    
    var speed = 100 
    var pause = 1000 
    var timerID = null 
    var texttype = false 
    var ar = new Array() 
    
    ar[0] = "Rtr.it - centro assistenza tecnica audio-video" 
    ar[1] = "Riparazioni tvcolor, vcr, hifi, carstereo, e installazioni antenne" 
    ar[2] = "ed inoltre vendita computer, accessori, decoder satellitari , etc..." 
    
    var msgnow = 0 
    var offset = 0 
    
    function stopBanner() { 
    if (texttype) 
    clearTimeout(timerID) 
    texttype = false 
    } 
    
    function startBanner() { 
    stopBanner() 
    showBanner() 
    } 
    
    function showBanner() { 
    var text = ar[msgnow] 
    
    if (offset < text.length) { 
    if (text.charAt(offset) == " ") 
    offset++ 
    
    var partialMessage = text.substring(0, offset + 1) 
    window.status = partialMessage 
    offset++ 
    timerID = setTimeout("showBanner()", speed) 
    texttype = true 
    } else { 
    offset = 0 
    msgnow++ 
    if (msgnow == ar.length) 
    msgnow = 0 
    
    timerID = setTimeout("showBanner()", pause) 
    texttype = true 
    } 
    } 
    
    </script>
    Apri l'home page con Blocco note, cerca il tag <HEAD>, sotto a questo incolla il codice.
    Poi cerca il tag <body bgcolor="colore"> e incollaci questo:
    codice:
    onLoad="startBanner()"
    in modo che risulti <body OnLoad="startBanner()" bgcolor="colore">
    Salva ed esci:gren:

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.