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

    Vorrei usare questo java script

    Vorrei usare questo menu in una struttura con frame ma non riesco ad inserire i link vi posto il codice:


    <script language="JavaScript1.2">
    /*
    Copyright © MaXimuS 2000-2001, All Rights Reserved.
    Site: http://www.absolutegb.com/maximus
    E-mail: maximus@nsimail.com
    Version: 6.1 (NS6 Compatibility)
    */

    // Default settings. Don't change them.

    YOffset=40; // no quotes!!
    staticYOffset=40; // no quotes!!
    slideSpeed=20 // no quotes!!
    waitTime=1000; // no quotes!! this sets the time the menu stays out for after the mouse goes off it.
    hdrFontFamily="Verdana";
    hdrFontSize="3";
    hdrFontColor="#000080";
    hdrBGColor="#AFCCDE";
    hdrAlign="right";
    hdrVAlign="center";
    hdrHeight="40";
    linkFontFamily="Verdana";
    linkFontSize="2";
    linkBGColor="#FFF7E5";
    linkOverBGColor="#FFF7E5";
    linkTarget="_top";
    linkAlign="left";
    menuBGColor="#000080";
    menuIsStatic="yes";
    menuWidth=110; // Must be a multiple of 10! no quotes!!
    barBGColor="#AFCCDE";
    barFontFamily="Verdana";
    barFontSize="2";
    barFontColor="#000080";
    barVAlign="top";
    barWidth=20; // no quotes!!

    NS6 = (document.getElementById&&!document.all)
    IE = (document.all)
    NS = (navigator.appName=="Netscape" && navigator.appVersion.charAt(0)=="4")

    moving=setTimeout('null',1)
    function moveOut() {
    if ((NS6 && parseInt(ssm.left)<0)||(IE && ssm.style.pixelLeft<0)||(NS && document.ssm.left<0)) {
    clearTimeout(moving);moving = setTimeout('moveOut()', slideSpeed)
    if (NS6) {theleft+=10;ssm.left = theleft;}
    if (IE) {ssm.style.pixelLeft += 10;}
    if (NS) {document.ssm.left += 10;document.ssm.clip.left-=10}}
    else {clearTimeout(moving);moving=setTimeout('null',1)} };
    function moveBack() {
    clearTimeout(moving);moving = setTimeout('moveBack1()', waitTime)}
    function moveBack1() {
    if ((NS6 && parseInt(ssm.left)>(-menuWidth))||(IE && ssm.style.pixelLeft>(-menuWidth))||(NS && document.ssm.left>(-menuWidth))) {
    clearTimeout(moving);moving = setTimeout('moveBack1()', slideSpeed);
    if (NS6) {theleft-=10;ssm.left = theleft;}
    if (IE) {ssm.style.pixelLeft -= 10;}
    if (NS) {document.ssm.left -= 10;document.ssm.clip.left+=10}}
    else {clearTimeout(moving);moving=setTimeout('null',1)} };

    lastY = 0;
    function makeStatic() {
    if (NS6) {winY = window.pageYOffset;}
    if (IE) {winY = document.body.scrollTop;var NM=document.all('ssm').style}
    if (NS) {winY = window.pageYOffset;var NM=document.ssm}
    if (NS6||IE||NS) {
    if (winY!=lastY&&winY>YOffset-staticYOffset) {
    smooth = .3 * (winY - lastY - YOffset + staticYOffset);}
    else if (YOffset-staticYOffset+lastY>YOffset-staticYOffset) {
    smooth = .3 * (winY - lastY);}
    else {smooth=0}
    if(smooth > 0) smooth = Math.ceil(smooth);
    else smooth = Math.floor(smooth);
    if (NS6) {ssm.top=parseInt(ssm.top)+smooth;}
    if (IE) NM.pixelTop+=smooth;
    if (NS) NM.top+=smooth;
    lastY = lastY+smooth;
    setTimeout('makeStatic()', 1)}}

    function initSlide() {
    if (NS6){
    ssm=document.getElementById("ssm").style
    ssm.visibility="visible";
    ssm.left = -menuWidth;}
    else if (IE) {
    document.all("ssm").style.visibility = "visible"
    document.all("ssm").style.pixelLeft = -menuWidth;}
    else if (NS) {
    document.layers["ssm"].clip.left = menuWidth;
    document.layers["ssm"].left = -menuWidth;
    document.layers["ssm"].visibility = "show"}
    if (menuIsStatic=="yes") makeStatic();}

    function reloadPage() {if(NS)location.reload()}

    function startMenu(menuHeader, barText) {
    if (IE||NS6) {document.write('<DIV ID="ssm" style="visibility:hidden;Position : Absolute ;Left : 0 ;Top : '+YOffset+' ;Z-Index : 20;width:1px" onmouseover="moveOut()" onmouseout="moveBack()">')}
    if (NS) {document.write('<LAYER visibility="hide" top="'+YOffset+'" name="ssm" bgcolor="'+menuBGColor+'" left="0" onmouseover="moveOut()" onmouseout="moveBack()">')}
    if (NS6){document.write('<table border="0" cellpadding="0" cellspacing="0" width="'+(menuWidth+barWidth+2)+'" bgcolor="'+menuBGColor+'"><TR><TD>')}
    tempBar=""
    for (i=0;i<barText.length;i++) {
    tempBar+=barText.substring(i, i+1)+"
    "}
    document.write('<table border="0" cellpadding="0" cellspacing="1" width="'+(menuWidth+barWidth+2)+'" bgcolor="'+menuBGColor+'"><tr><td bgcolor="'+hdrBGColor+'" WIDTH="'+(menuWidth-1)+'" HEIGHT="'+hdrHeight+'" ALIGN="'+hdrAlign+'" VALIGN="'+hdrVAlign+'"> <font face="'+hdrFontFamily+'" Size="'+hdrFontSize+'" COLOR="'+hdrFontColor+'">'+menuHeader+'</font></td><td align="center" rowspan="100" width="'+barWidth+'" bgcolor="'+barBGColor+'" valign="'+barVAlign+'"><p align="center"><font face="'+barFontFamily+'" Size="'+barFontSize+'" COLOR="'+barFontColor+'">'+tempBar+'</font></p></TD></tr>')
    theleft=-menuWidth}

    function addItem(text, link, target) {
    if (!target) {target=linkTarget}
    document.write('<TR><TD BGCOLOR="'+linkBGColor+'" onmouseover="bgColor=\''+linkOverBGColor+'\'" onmouseout="bgColor=\''+linkBGColor+'\'" WIDTH="'+(menuWidth-1)+'"><ILAYER><LAYER onmouseover="bgColor=\''+linkOverBGColor+'\'" onmouseout="bgColor=\''+linkBGColor+'\'" WIDTH="100%" ALIGN="'+linkAlign+'"><DIV ALIGN="'+linkAlign+'"><FONT face="'+linkFontFamily+'" Size="'+linkFontSize+'"> <A HREF="'+link+'" target="'+target+'" CLASS="ssmItems">'+text+'</DIV></LAYER></ILAYER></TD></TR>')}

    function addHdr(text) {
    document.write('<tr><td bgcolor="'+hdrBGColor+'" HEIGHT="'+hdrHeight+'" ALIGN="'+hdrAlign+'" VALIGN="'+hdrVAlign+'" WIDTH="'+(menuWidth-1)+'"> <font face="'+hdrFontFamily+'" Size="'+hdrFontSize+'" COLOR="'+hdrFontColor+'">'+text+'</font></td></tr>')}

    function endMenu() {
    document.write('<tr><td bgcolor="'+hdrBGColor+'"><font size="0" face="Arial"> </font></td></TR></table>')
    if (NS6){document.write('</TD></TR></TABLE>')}
    if (IE||NS6) {document.write('</DIV>')}
    if (NS) {document.write('</LAYER>')}
    if (NS6||IE||NS) setTimeout('initSlide();', 500)}

    window.onresize=reloadPage

    /*
    Configure menu styles below
    NOTE: To edit the link colors, go to the STYLE tags and edit the ssmItems colors
    */
    YOffset=20; // no quotes!!
    staticYOffset=20; // no quotes!!
    slideSpeed=20 // no quotes!!
    waitTime=500; // no quotes!! this sets the time the menu stays out for after the mouse goes off it.
    menuBGColor="#006600";
    menuIsStatic="yes";
    menuWidth=100; // Must be a multiple of 10! no quotes!!
    hdrFontFamily="verdana";
    hdrFontSize="2";
    hdrFontColor="#ffffff";
    hdrBGColor="#006600";
    hdrAlign="left";
    hdrVAlign="center";
    hdrHeight="20";
    linkFontFamily="Verdana";
    linkFontSize="1";
    linkBGColor="white";
    linkOverBGColor="#66ff66";
    linkTarget="_top";
    linkAlign="Left";
    barBGColor="#990000";
    barFontFamily="Verdana";
    barFontSize="2";
    barFontColor="white";
    barVAlign="center";
    barWidth=20; // no quotes!!

    startMenu("Menu", "100x100")
    addItem("Home", "http://www.centoxcento.cjb.net", "");
    addItem("voce 1", "http://www.centoxcento.cjb.net", "");
    addItem("voce 2", "http://www.centoxcento.cjb.net", "");
    addItem("voce 3", "http://www.centoxcento.cjb.net", "");
    addItem("voce 4", "http://www.centoxcento.cjb.net", "");
    addItem("voce 5", "http://www.centoxcento.cjb.net", "");
    addItem("voce 6", "http://www.centoxcento.cjb.net", "");
    addItem("voce 7", "http://www.centoxcento.cjb.net", "");
    addItem("voce 8", "http://www.centoxcento.cjb.net", "");
    addItem("voce 9", "http://www.centoxcento.cjb.net", "");
    addItem("voce 10", "http://www.centoxcento.cjb.net", "");
    addItem("voce 11", "http://www.centoxcento.cjb.net", "");
    addItem("voce 12", "http://www.centoxcento.cjb.net", "");
    addItem("voce 13", "http://www.centoxcento.cjb.net", "");
    addItem("voce 14", "http://www.centoxcento.cjb.net", "");
    endMenu()

    </script>

    Dovrei modificare i vari link nel menu startMenu ma non ci riesco allego pure il link da dove ho scaricato questo codice:

    http://centox100.altervista.org/pages/m-scomparsa.htm

  2. #2
    Amministratore L'avatar di Vincent.Zeno
    Registrato dal
    May 2003
    residenza
    Emilia-Romagna (tortellini und cappelletti land!)
    Messaggi
    20,783
    :master: ... che vuol dire "non riesci" ?

  3. #3
    Originariamente inviato da Vincent.Zeno
    :master: ... che vuol dire "non riesci" ?
    Piu che riuscire non so cosa mettere,nel startMenu,dove linka http...!Io uso come ho detto prima
    i frame se volessi collegare una pagina con solo corpo della struttura cosa devo mettere a posto dell'Http......!

  4. #4
    se collega all'index metti index.php o html quello che hai O.O

  5. #5
    No scusa ho letto male il tuo mex

  6. #6
    Originariamente inviato da fabiosuper14
    se collega all'index metti index.php o html quello che hai O.O


    Scusa la mia ignoranza mi faresti l'esempio sul codice!

  7. #7
    Amministratore L'avatar di Vincent.Zeno
    Registrato dal
    May 2003
    residenza
    Emilia-Romagna (tortellini und cappelletti land!)
    Messaggi
    20,783
    codice:
     // Default settings. Don't change them.
    
    linkTarget="_top";
    cambia il target... metti il tuo frame di destinazione

    vedi se funziona... perchè non so se è possibile cambiare il target

  8. #8
    Originariamente inviato da Vincent.Zeno
    codice:
     // Default settings. Don't change them.
    
    linkTarget="_top";
    cambia il target... metti il tuo frame di destinazione

    vedi se funziona... perchè non so se è possibile cambiare il target
    Se il frame di destinazione e Corpo devo scrivere quest'ultimo a posto di _top?E a posto dell'Http se voglio inserire una pagina da fare caricare nel corpo delle struttura cosa devo mettere?

  9. #9
    Amministratore L'avatar di Vincent.Zeno
    Registrato dal
    May 2003
    residenza
    Emilia-Romagna (tortellini und cappelletti land!)
    Messaggi
    20,783

    Re: Vorrei usare questo java script

    Originariamente inviato da Maveric78
    ... allego pure il link da dove ho scaricato questo codice:
    http://centox100.altervista.org/pages/m-scomparsa.htm
    ma porc.... ci sono pure le istruzione per l'uso con frame!!!

    (la soluzione che avevo proposto nn è valida)

  10. #10
    Originariamente inviato da Maveric78
    Se il frame di destinazione e Corpo devo scrivere quest'ultimo a posto di _top?E a posto dell'Http se voglio inserire una pagina da fare caricare nel corpo delle struttura cosa devo mettere?
    Ma c hai capito cosa?

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.