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

    Menu tendina JS (voglio modificare le font)

    Ciao a Tutti,
    ho scaricato un menu a tendina in js ed ora che tutto funonzia vorrei poter cambiare la visualizzazione delle font, mi potete aiutare???

    ho visto che nel codice viente richiamata una classe (in rosso) ma aggiungendola al css non cambia nulla (ipotesi di errori da deficienti)


    script language="JavaScript">
    var ron="#66CCFF"; // Colore al MouseOver
    var roff="#BADEF5"; // Colore di default
    var leftmargin=5; // Distanza dal margine sinistro della pagina
    var topmargin=2; // Distanza dal margine superiore della pagina
    var largo=135; // Larghezza dei layers, quindi distanza (orizzontale) fra i sottomenu
    var voci=new Array();
    voci[0]=new Array("Azienda","Chi Siamo","Dove Siamo","I Nostri Centri","Contatti");
    voci[1]=new Array("Prodotti","Sistemi a raggi X","Sist a telecamera","Altri Sistemi");
    voci[2]=new Array("Servizi","Assistenza Tec.","Test di laboratorio","Assicurazione Qualità","Certificazioni","Noleggio");
    voci[3]=new Array("Tecnologia","La Visione","I Raggi X","Il Software","Tracciabilità");
    voci[4]=new Array("News","Fiere","News");
    var links=new Array();
    links[0]=new Array("","frm_chisiamo.htm","frm_dove.htm","frm_no stricentri.htm","frm_contatti.htm");
    links[1]=new Array("","frm_sistraggix.htm","frm_sisttele.htm"," frm_altrisist.htm");
    links[2]=new Array("","frm_assistenza.htm","frm_testlabo.htm"," frm_assicuraqua.htm","frm_certificazioni.htm","frm _noleggio.htm");
    links[3]=new Array("","frm_vision.htm","frm_raggix.htm","frm_so ftware.htm","frm_tracciabilita.htm");
    links[4]=new Array("","frm_events.htm","frm_news.htm");
    var wst=new Array();
    wst[0]=new Array();
    wst[1]=new Array();
    wst[2]=new Array();
    wst[3]=new Array();
    wst[4]=new Array();

    /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
    * Fine sezione personalizzabile.
    * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
    var nn=document.layers?true:false,conta=0,last=0;

    if (nn)
    {
    document.write("<LAYER NAME=mtop. position=absolute left="+leftmargin+" top="+topmargin+" width=50 height=30 clip=0,0,50,20 bgColor="+roff+" visibility=visible onMouseOver=showdeps(last,false);mroll('mtop.') onMouseOut=unmroll('mtop.')>Home</LAYER>");
    for (i=0;i<voci.length;i++)
    {
    var n=i;
    document.writeln("<LAYER NAME=mtop"+n+". position=absolute left="+eval(leftmargin+50+largo*i)+" top="+topmargin+" width="+largo+" height=20 clip=0,0,"+largo+",20 bgColor="+roff+" visibility=visible onMouseOver=MostraMenu("+i+");mroll('mtop"+i+".'); conta++ onMouseOut=last="+i+";unmroll('mtop"+i+".');conta--><DIV ALIGN=center><A HREF=javascript:mroll('mtop"+i+".') CLASS=menuNNb>[I]"+voci[0]+"</A></DIV></LAYER>");
    for (l=1;l<voci[i].length;l++)
    document.writeln("<LAYER NAME=mdep"+i+"."+l+" position=absolute left="+eval(leftmargin+50+largo*i)+" top="+eval(topmargin+15*l)+" width="+largo+" height=20 clip=0,0,"+largo+",20 bgColor="+roff+" visibility=hidden onMouseOver=mroll('mdep"+n+"."+l+"');conta++ onMouseOut=unmroll('mdep"+n+"."+l+"');conta--><A HREF=javascript:mroll('mdep"+n+"."+l+"') onClick=vai('"+links[i][l]+"',"+i+","+l+") CLASS=menuNN>"+voci[i][l]+"</A></LAYER>");
    }
    }
    else
    {
    document.write("<DIV ID=mtop. STYLE=\"position:absolute;left:"+leftmargin+";top: "+topmargin+";width:50;height:20;background:"+roff +";visibility:visible;cursor:hand\" onMouseOver=showdeps(last,false);mroll('mtop.') onMouseOut=unmroll('mtop.')>Home</DIV>");
    for (i=0;i<voci.length;i++)
    {
    var n=i;
    document.writeln("<DIV ID=mtop"+n+". STYLE=\"position:absolute;left:"+eval(leftmargin+5 0+largo*i)+";top:"+topmargin+";width:"+largo+";hei ght:20;background:"+roff+";visibility:visible;curs or:hand\" onMouseOver=MostraMenu("+n+");mroll('mtop"+n+".'); conta++ onMouseOut=last="+n+";unmroll('mtop"+n+".');conta--><DIV ALIGN=center CLASS=menuIEb>[I]"+voci[0]+"</DIV></DIV>");
    for (l=1;l<voci[i].length;l++)
    document.writeln("<DIV ID=mdep"+i+"."+l+" STYLE=\"position:absolute;left:"+eval(leftmargin+5 0+largo*i)+";top:"+eval(topmargin+15*l)+";width:"+ largo+";height:20;background:"+roff+";visibility:h idden;cursor:hand\" onMouseOver=;mroll('mdep"+n+"."+l+"');conta++ onMouseOut=unmroll('mdep"+n+"."+l+"');conta-- CLASS=menuIE onClick=vai('"+links[i][l]+"',"+i+","+l+")>"+voci[i][l]+"</DIV>");
    }
    }

    timer=setInterval("NascondiMenu()",1000)

    function NascondiMenu()
    {
    if (conta==0)
    {
    coloratutti(true)
    timer=setTimeout("coloratutti(false)",200);
    timer=setTimeout("showdeps(last,false)",250);
    }
    }

    function coloratutti(col)
    {
    colore=col?ron:roff;
    for (i=0;i<voci.length;i++)
    for (j=1;j<voci[i].length;j++)
    {
    if (nn)
    document.layers["mdep"+i+"."+j].bgColor=colore;
    else
    if(document.all)
    document.all["mdep"+i+"."+j].style.background=colore;
    else
    document.getElementById('mdep'+i+"."+j).style.back ground=colore;
    }
    }

    function MostraMenu(n)
    {
    showdeps(last,false);
    showdeps(n,true);
    last=n;
    }

    function showdeps(n,act)
    {
    if (conta==0)
    {
    act?stat="visible":stat="hidden";
    if (nn)
    for (i=1;i<voci[n].length;i++)
    document.layers["mdep"+n+"."+i].visibility=stat;
    else
    for (i=1;i<voci[n].length;i++)
    if(document.all)
    document.all["mdep"+n+"."+i].style.visibility=stat;
    else
    document.getElementById('mdep'+n+"."+i).style.visi bility=stat;
    }
    }


    function vai(dove,r,c)
    {
    lev=nn?document.layers["mdep"+r+"."+c]document.all)?document.all["mdep"+r+"."+c].style:document.getElementById("mdep"+r+"."+c).sty le;
    if (nn)
    {
    lev.bgColor=roff;
    timer=setTimeout("lev.bgColor=ron",50)
    timer=setTimeout("lev.bgColor=roff",100)
    timer=setTimeout("lev.bgColor=ron",150)
    timer=setTimeout("lev.bgColor=roff",200)
    timer=setTimeout("lev.bgColor=ron",250)
    }
    else
    {
    lev.background=roff;
    timer=setTimeout("lev.background=ron",50)
    timer=setTimeout("lev.background=roff",100)
    timer=setTimeout("lev.background=ron",150)
    timer=setTimeout("lev.background=roff",200)
    timer=setTimeout("lev.background=ron",250)
    }
    timer=setTimeout("self.location.href='"+dove+"'",3 50)
    }

    function mroll(l)
    {
    nn?document.layers[l].bgColor=rondocument.all)?document.all[l].style.background=ron:document.getElementById(l).s tyle.background=ron;
    document.getElementById?document.getElementById(l) .style.cursor=document.all?'hand':'pointer':'void( 0)';
    if (l.substr(0,4)=="mdep")
    stringa=wst[l.substr(4,l.indexOf(".")-4)][l.substring(l.indexOf(".")+1,l.length)];
    else if (l.length>5)
    stringa=wst[l.substr(4,l.indexOf(".")-4)][0];
    else stringa="Home Page";
    window.status=stringa;
    timer=setTimeout("window.status=stringa",20);
    }

    function unmroll(l)
    {
    nn?document.layers[l].bgColor=roffdocument.all)?document.all[l].style.background=roff:document.getElementById(l). style.background=roff;
    window.status="";
    }
    </script>
    </head>menu tendina</head>

    <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <table width="600" height="88" border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td height="25" colspan="2">[img]img_home/testa.gif[/img]</td>
    </tr>
    </body>

  2. #2
    Utente di HTML.it L'avatar di Xinod
    Registrato dal
    Sep 2000
    Messaggi
    13,649
    Originariamente inviato da lorenzhope
    ho scaricato un menu a tendina in js
    scaricato da dove? un link facilita il compito di chi potrebbe volerti dare una mano

  3. #3
    non ricordo, scusa

  4. #4
    dovrebbe essere da qui nella sezione download

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