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

    childNodes e riferimento <a ref>

    salve,
    ho questo script che mi visualizza le news con effetto fade.
    Tutto funziona se non ci sono collegamenti. IN ROSSO QUELLO CHE VORREI
    Codice PHP:
    <style>
    #tic {
      /*border: 1px #CEC3AD solid;*/
      /*font-size:12px;*/
      
    padding:10px;
      
    width:160px;
      
    /*line-height:20px;*/
    }
    #tic *{
      
    font-size8px;
      
    margin:0px;
      
    padding:0px;
      
    display:none;
    }
    #tic a {
       
    display:inline;
    }

    </
    style>

    <
    script type="text/javascript" language="JavaScript">
    <!--
    var list; 
    var 
    tickerObj
    var 
    hex 255;

    function 
    fadeText(divId) {
      if(
    tickerObj)
      {
        if(
    hex>0) {
          
    hex-=5// increase color darkness
          
    tickerObj.style.color="rgb("+hex+","+hex+","+hex+")";
          
    setTimeout("fadeText('" divId "')"fadeSpeed); 
        } else
          
    hex=255//reset hex value
      
    }
    }

    function 
    initialiseList(divId) {
      
    tickerObj document.getElementById(divId);
      if(!
    tickerObj)
        
    reportError("Could not find a div element with id \"" divId "\"");
      list = 
    tickerObj.childNodes;
      
      if(list.
    length <= 0)
        
    reportError("The div element \"" divId "\" does not have any children");
      for (var 
    i=0i<list.lengthi++) {
        var 
    node = list[i];
        if (
    node.nodeType == && !/\S/.test(node.nodeValue)) 
                  
    tickerObj.removeChild(node);
      }
      
    run(divId0);
    }

    function 
    run(divIdcount) {
      
    fadeText(divId);
      list[
    count].style.display "block";
      if(
    count 0)
        list[
    count-1].style.display "none";
      else
        list[list.
    length-1].style.display "none";
      
    count++;
      if(
    count == list.length)
        
    count 0;
      
    window.setTimeout("run('" divId "', " count")"interval*1000);
    }
    function 
    reportError(error) {
      
    alert("The script could not run because you have errors:\n\n" error);
      return 
    false;
    }

    var 
    interval 3// interval in seconds
    var fadeSpeed 40;

    //-->
    </script>




    <div align="center">


    <div id="tic">
    [COLOR=red]<ul>[url="#"]Allora vedo che non ha capito. Io non sono qui per salvare Rambo da voi. Io sono qui per salvare voi da lui[/url][/list][/COLOR]
    <ul>Detenuto, due cose! Primo: io sono Meissner. Secondo: non cercare mai di fottere Meissner[/list]
    <ul>Vergogna! Le prove sono state contraffatte! È impossibile! Io non ho infranto la legge! Io, sono la legge[/list]
    <ul>Ricordati di non sottovalutare mai il potere infinito dello sforzo. (Mel Brooks in "Balle spaziali")[/list]
    </div>

    <script type="text/javascript">
    <!--
      initialiseList("tic");
    //-->
    </script>



    </div> 
    In pratica vorrei solo avere delle news lincabili
    grazie
    Carpe diem
    Preferisco tentare che rinunziare

  2. #2
    PER I MODERATORI:
    chiedo scusa ...ma penso di aver sbagliato forum.
    Potreste spostarmi in uno giusto?
    Grazie
    Carpe diem
    Preferisco tentare che rinunziare

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.