Pagina 1 di 2 1 2 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 15
  1. #1

    Menù scorrimento verticale

    Cerco lo scrpt per avere un menù laterale che scorre verticalmente con lo scroll, ad esmpio tipo quello che è nel sito delle poste www.poste.it.
    Chi mi può aiutare?
    Grazie

  2. #2
    Utente di HTML.it L'avatar di medorex
    Registrato dal
    Apr 2002
    Messaggi
    252

    divertiti!

    Codice PHP:
    <html>
    <
    head>
    <
    title>Documento senza titolo</title>
    <
    meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <
    script language="JavaScript" type="text/JavaScript">
    <!--
    function 
    MM_reloadPage(init) {  
      if (
    init==truewith (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
        
    document.MM_pgW=innerWidthdocument.MM_pgH=innerHeightonresize=MM_reloadPage; }}
      else if (
    innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgHlocation.reload();
    }
    MM_reloadPage(true);

    function 
    MM_findObj(nd) { 
      var 
    p,i,x;  if(!dd=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        
    d=parent.frames[n.substring(p+1)].documentn=n.substring(0,p);}
      if(!(
    x=d[n])&&d.allx=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(
    i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!
    && d.getElementByIdx=d.getElementById(n); return x;
    }

    function 
    flevDivPositionValue(sDivsProperty) { 
        
    this.opera = (window.opera); // Opera 5+
        
    this.ns4 = (document.layers); // Netscape 4.x
        
    this.ns6 = (document.getElementById && !document.all && !this.opera); // Netscape 6+
        
    this.ie = (document.all);  // Internet Explorer 4+
        
    var sValue ""docObj = eval("MM_findObj('" sDiv "')"); if (docObj == null) {return 0;}
        if ((
    sProperty == "left") || (sProperty == "top")) {
            if (!
    this.ns4) {docObj docObj.style;} 
            
    sValue = eval("docObj." sProperty);
            if ((
    this.ie) && (sValue == "")) { // IE (con PC) 
                
    if (sProperty == "top") { sValue = eval(sDiv ".offsetTop"); } 
                else { 
    sValue = eval(sDiv ".offsetLeft"); } 
            };
        }
        else {
            if (
    this.opera) {
                
    docObj docObj.style;
                if (
    sProperty == "height") { sValue docObj.pixelHeight; } 
                else if (
    sProperty == "width") { sValue docObj.pixelWidth; } 
            }
            else if (
    this.ns4) {sValue = eval("docObj.clip." sProperty);} 
            else if (
    this.ns6) {sValue document.defaultView.getComputedStyle(docObj"").getPropertyValue(sProperty); } 
            else if (
    this.ie) { 
                if (
    sProperty == "width") { sValue = eval(sDiv ".offsetWidth"); } 
                else if (
    sProperty == "height") { sValue = eval(sDiv ".offsetHeight"); } 
            }
           }
        
    sValue = (sValue == "") ? sValue
        if (
    isNaN(sValue)) { if (sValue.indexOf('px') > 0) { sValue sValue.substring(0,sValue.indexOf('px')); } } 
        return 
    parseInt(sValue); 
    }

    function 
    flevPersistentLayer() { 
        var 
    sD arguments[0], oD = eval("MM_findObj('" sD "')"), iWWiWHiSXiSYiT 10sS "";
        if (!
    document.layers) {oD oD.style;}
        if (
    oD.tmpTimeout != null) {clearTimeout(oD.tmpTimeout);}
        var 
    sXL arguments[1], sXC arguments[2], sXR arguments[3], sYT arguments[4], sYC arguments[5], sYB arguments[6];
        var 
    iS = (arguments.length 7) ? parseInt(arguments[7]) : 0iPx = (arguments.length 8) ? parseInt(arguments[8]) : 0;
        if (
    window.innerWidth) { // NS4, NS6 and Opera
            
    var oW windowiWW oW.innerWidthiWH oW.innerHeightiSX oW.pageXOffsetiSY oW.pageYOffset; }
        else if (
    document.documentElement && document.documentElement.clientWidth) {
            var 
    oDE document.documentElementiWW oDE.clientWidthiWH oDE.clientHeightiSX oDE.scrollLeftiSY oDE.scrollTop; }
        else if (
    document.body) { // IE4+
            
    var oDB document.bodyiWW oDB.clientWidthiWH oDB.clientHeightiSX oDB.scrollLeftiSY oDB.scrollTop; }
        else {return;}
        var 
    iCX iNX flevDivPositionValue(sD'left'), iCY iNY flevDivPositionValue(sD'top');
        if (
    sXL != "") {iNX iSX parseInt(sXL);} 
        else if (
    sXC != "") {iNX Math.round(iSX + (iWW/2) - (flevDivPositionValue(sD'width')/2));}
        else if (
    sXR != "") {iNX iSX iWW - (flevDivPositionValue(sD'width') + parseInt(sXR));}
        if (
    sYT != "") {iNY iSY parseInt(sYT);}
        else if (
    sYC != "") {iNY Math.round(iSY + (iWH/2) - (flevDivPositionValue(sD'height')/2));}
        else if (
    sYB != "") {iNY iSY + (iWH flevDivPositionValue(sD'height') - parseInt(sYB));}
        if ((
    iCX != iNX) || (iCY != iNY)) {
            if (
    iS 0) {
                if (
    iPx 0) { iT iS;
                    var 
    iPxX iPxiPxY iPxiMX Math.abs(iCX iNX), iMY Math.abs(iCY iNY);
                    
    // take care of diagonal movement
                    
    if (iMX iMY) {iPxY = (iMX != 0) ? ((iMY/iMX)*iPx) : iPx;}
                    else {
    iPxX = (iMY != 0) ? ((iMX/iMY)*iPx) : iPx;}
                    if (
    iPxX >= iMX) {iPxX Math.min(Math.ceil(iPxX), iPx);}
                    if (
    iPxY >= iMY) {iPxY Math.min(Math.ceil(iPxY), iPx);}
                    
    // temporary X/Y coordinates
                    
    if ((iCX iNX) && (iCX iPxX iNX)) {iNX iCX iPxX;}
                    if ((
    iCX iNX) && (iCX iPxX iNX)) {iNX iCX iPxX;}
                    if ((
    iCY iNY) && (iCY iPxY iNY)) {iNY iCY iPxY;}
                    if ((
    iCY iNY) && (iCY iPxY iNY)) {iNY iCY iPxY;} }
                else { 
                    var 
    iMX = ((iNX iCX) / iS), iMY = ((iNY iCY) / iS); 
                    
    iMX = (iMX 0) ? Math.ceil(iMX) : Math.floor(iMX); iNX iCX iMX
                    
    iMY = (iMY 0) ? Math.ceil(iMY) : Math.floor(iMY); iNY iCY iMY; } }
            if ((
    parseInt(navigator.appVersion)>|| navigator.userAgent.indexOf("MSIE")>-1) && (!window.opera)) {sS="px";}
            if (
    iMX != 0) {eval("oD.left = '" iNX sS "'");}
            if (
    iMY != 0) {eval("oD.top = '" iNY sS "'");} }
        var 
    sF "flevPersistentLayer('" sD "','" sXL "','" sXC "','" sXR "','" sYT "','" sYC "','" sYB "'," iS "," iPx ")";
        
    oD.tmpTimeout setTimeout(sF,10);
    }

    function 
    flevInitPersistentLayer() { 
        if (
    arguments.length 8) {return;}
        var 
    sD arguments[0]; if (sD == "") {return;}
        var    
    oD = eval("MM_findObj('" sD "')"); if (!oD) {return;}
        var 
    iCSS parseInt(arguments[1]);
        var 
    sXL arguments[2], sXC arguments[3], sXR arguments[4], sYT arguments[5], sYC arguments[6], sYB arguments[7];
        var 
    iS = (arguments.length 8) ? parseInt(arguments[8]) : 0iPx = (arguments.length 9) ? parseInt(arguments[9]) : 0;
        if (
    iCSS != 0) { if (!document.layers) {oD oD.style;} sXL parseInt(oD.left), sYT parseInt(oD.top);}
        var 
    sF "flevPersistentLayer('" sD "','" sXL "','" sXC "','" sXR "','" sYT "','" sYC "','" sYB "'," iS "," iPx ")";
        eval(
    sF);
    }
    //-->
    </script>
    </head>

    <body onLoad="flevInitPersistentLayer('Layer1',1,'','','','','','',10)">

    <div id="Layer1" style="position:absolute; left:217px; top:93px; width:92px; height:132px; z-index:1; background: #000000; layer-background-color: #000000; border: 1px none #000000;"></div>
    <div id="Layer2" style="position:absolute; left:52px; top:2578px; width:223px; height:78px; z-index:2; background: #000000; layer-background-color: #000000; border: 1px none #000000;"></div>
    </body>
    </html> 
    ciao Medo
    Ma quando impareremo mai ??

  3. #3
    Non funzia, c'è solo un bel rettangolo nero.....

  4. #4
    Utente di HTML.it L'avatar di medorex
    Registrato dal
    Apr 2002
    Messaggi
    252

    ok

    Ma il rettangolo nero si sposta se scolli la pagina in giu!
    Ma quando impareremo mai ??

  5. #5

  6. #6
    Utente di HTML.it L'avatar di medorex
    Registrato dal
    Apr 2002
    Messaggi
    252

    ie o ns?

    che browser hai?
    Ma quando impareremo mai ??

  7. #7

    Re: ie o ns?

    Originariamente inviato da medorex
    che browser hai?
    IE

    ma cosa intendi con se scolli la pagina in giu! ?

  8. #8
    Utente di HTML.it L'avatar di medorex
    Registrato dal
    Apr 2002
    Messaggi
    252
    Se vuoi un menu laterale che scorre in basso e in alto xchè hai una pagina piu alta della altezza del tuo monitor è inevitabile che per vedere tutta la pagina, la scorri in giù!
    Ovviamnete il menu (nel mio esempio il quadrato nero) si muove solo se scorri la pagina!

    ... di più nin sò!
    Ma quando impareremo mai ??

  9. #9
    A me funziona tutto OK, grazie

  10. #10
    Originariamente inviato da medorex
    Se vuoi un menu laterale che scorre in basso e in alto xchè hai una pagina piu alta della altezza del tuo monitor è inevitabile che per vedere tutta la pagina, la scorri in giù!
    Ovviamnete il menu (nel mio esempio il quadrato nero) si muove solo se scorri la pagina!

    ... di più nin sò!
    che cacchio adesso ho capito...meglio tard che mai io pensavo di ritrovarmi un menu con qualche scritta....non avevo capito che scorreva su e giu senza uscire dalla visulaizzazione......

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.