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

    Problema compatibilita script

    Ciao a tutti,

    ho scaricato questo script da internet ma non mi funziona su firefox!!!
    codice:
    Slide Menu
    ----------
    
    <html>
    <head>
    <title>Slide menu</title>
    <!------------------------------------------------------
    Questo e' il foglio di stile che permette di definire
    il colore dello sfondo e del testo
    
    ------------------------------------------------------->
    <STYLE TYPE="text/css">
    <!--
    A {color:#000000; font-family:'Arial'; font-size:10pt; line-height:20pt;}
    STRONG {font-family:'Arial'; font-size:15pt; font-weight:bold; line-height:25pt;}
    P {font-family:'Arial'; font-size:10pt; line-height:13pt;}
    #pulloutInterface {position:absolute; left:50; top:50; width:400; height:250; clip:rect(0,400,250,0); background-color:#000000; layer-background-color:#000000; visibility:visible;}
    #pulloutSidebar1 {position:absolute; left:5; top:5; width:100; height:30; clip:rect(0,100,30,0); background-color:#DEDEDE; layer-background-color:#DEDEDE;}
    #pulloutSidebar2 {position:absolute; left:5; top:40; width:100; height:30; clip:rect(0,100,30,0); background-color:#C5C5C5; layer-background-color:#C5C5C5;}
    #pulloutSidebar3 {position:absolute; left:5; top:75; width:100; height:30; clip:rect(0,100,30,0); background-color:#A2A2A2; layer-background-color:#A2A2A2;}
    #pulloutSidebar4 {position:absolute; left:5; top:110; width:100; height:30; clip:rect(0,100,30,0); background-color:#7E7E7E; layer-background-color:#7E7E7E;}
    #pulloutContent {position:absolute; left:110; top:5; width:285; height:240; clip:rect(0,285,240,0); background-color:#000000; layer-background-color:#000000;}
    #pulloutContent1 {position:absolute; left:0; top:0; width:285; height:240; clip:rect(0,285,240,0); background-color:#DEDEDE; layer-background-color:#DEDEDE; visibility:visible;}
    #pulloutContent2 {position:absolute; left:-285; top:0; width:285; height:240; clip:rect(0,285,240,0); background-color:#C5C5C5; layer-background-color:#C5C5C5; visibility:hidden;}
    #pulloutContent3 {position:absolute; left:-285; top:0; width:285; height:240; clip:rect(0,285,240,0); background-color:#A2A2A2; layer-background-color:#A2A2A2; visibility:hidden;}
    #pulloutContent4 {position:absolute; left:-285; top:0; width:285; height:240; clip:rect(0,285,240,0); background-color:#7E7E7E; layer-background-color:#7E7E7E; visibility:hidden;}
    //-->
    </STYLE>
    <SCRIPT LANGUAGE="JavaScript">
    <!--
    n = (document.layers) ? 1:0
    ie = (document.all) ? 1:0
    function init() {
    	pulloutActive = 0
    	if (n) {
    		pullout1 = document.pulloutInterface.document.pulloutContent.document.pulloutContent1
    		pullout2 = document.pulloutInterface.document.pulloutContent.document.pulloutContent2
    		pullout3 = document.pulloutInterface.document.pulloutContent.document.pulloutContent3
    		pullout4 = document.pulloutInterface.document.pulloutContent.document.pulloutContent4
    	}
    	if (ie) {
    		pullout1 = pulloutContent1.style
    		pullout2 = pulloutContent2.style
    		pullout3 = pulloutContent3.style
    		pullout4 = pulloutContent4.style
    	}
    	pulloutShown = pullout1		// the layer that is currently shown
    	pulloutShown.xpos = 0
    	pulloutNew = "none"			// the layer that we will be shown next
    	pulloutNew.xpos = -285
    }
    // Pullout Function, starts the sequence
    function pullout(which) {
    	if (!pulloutActive && pulloutShown != which) {
    		pulloutActive = 1  // this makes it so you can't start it again until it's finished
    		pulloutNew = which
    		pulloutNew.xpos = -285
    		pulloutLeft()
    	}
    }
    
    // Slide the old layer out of view
    function pulloutLeft() {
    	if (pulloutShown.xpos > -285) {
    		pulloutShown.xpos -= 15
    		pulloutShown.left = pulloutShown.xpos
    		setTimeout("pulloutLeft()",30)
    	}
    	else {
    		hide(pulloutShown)
    		show(pulloutNew)
    		setTimeout("pulloutRight()",50)
    	}
    }
    
    // Slide the new layer into view
    function pulloutRight() {
    	if (pulloutNew.xpos < 0) {
    		pulloutNew.xpos += 15
    		pulloutNew.left = pulloutNew.xpos
    		setTimeout("pulloutRight()",30)
    	}
    	else {
    		pulloutShown = pulloutNew
    		pulloutActive = 0  // stops the sequence
    	}
    }
    // Show/Hide Functions
    function show(showobj) {
    	if (n) showobj.visibility = "show"
    	if (ie) showobj.visibility = "visible"
    }
    function hide(hideobj) {
    	if (n) hideobj.visibility = "hide"
    	if (ie) hideobj.visibility = "hidden"
    }
    
    //-->
    </SCRIPT>
    </head>
    
    <body onLoad="init()">
    
    
    <!-------------------------------------------------
    
    Questi sono i nomi dei menu di sinistra
    
    ------------------------------------------------------->
    <DIV ID="pulloutInterface">
    <DIV ID="pulloutSidebar1"><P ALIGN=CENTER>Primo gruppo</P></DIV>
    <DIV ID="pulloutSidebar2"><P ALIGN=CENTER>Secondo gruppo</P></DIV>
    <DIV ID="pulloutSidebar3"><P ALIGN=CENTER>Terzo gruppo</P></DIV>
    <DIV ID="pulloutSidebar4"><P ALIGN=CENTER>Quarto gruppo</P></DIV>
    
    
    <!------------------------------------------------------
    
    Ognuno dei gruppi che segue e' il testo che appare
    quando si clicca su una delle voci di menu si sinistra
    
    ------------------------------------------------------->
    
    <DIV ID="pulloutContent">
    <DIV ID="pulloutContent1">
    <P ALIGN="CENTER">Link 1
    <TABLE BORDER=0 WIDTH=275><TD>
    
    
    Qui va inserito il testo che vuole richiamare dal menu di sinistra (Link 1).
    
    
    4you Gratis!
    </TD></TABLE>
    </P>
    </DIV>
    
    <DIV ID="pulloutContent2">
    <P ALIGN="CENTER">Link 2
    <TABLE BORDER=0 WIDTH=275><TD>
    
    
    Qui va inserito il testo che vuole richiamare dal menu di sinistra (Link 2). 
    </TD></TABLE>
    </P>
    </DIV>
    
    <DIV ID="pulloutContent3">
    <P ALIGN="CENTER">Link 3
    <TABLE BORDER=0 WIDTH=275><TD>
    
    
    Qui va inserito il testo che vuole richiamare dal menu di sinistra (Link 3). Risorse per tutti i webmaster su 4you Gratis!</TD></TABLE>
    </P>
    </DIV>
    
    <DIV ID="pulloutContent4">
    <P ALIGN="CENTER">Link 4
    <TABLE BORDER=0 WIDTH=275><TD>
    
    
    Qui va inserito il testo che vuole richiamare dal menu di sinistra (Link 4).</TD></TABLE>
    </P>
    </DIV>
    </DIV>
    </body>
    </html>
    Come posso farlo funzionare anche in firefox???

    Grazie a tutti
    Tommaso

  2. #2
    Utente di HTML.it L'avatar di Xinod
    Registrato dal
    Sep 2000
    Messaggi
    13,649
    perche' appartiene ad un era geologica remotissima
    cerca qualcosa di simile, ma recente

  3. #3
    ho cercato un sacco ma uno script simile non sono riuscito a trovarlo!!!

    Non si riesce ad attualizzarlo???

  4. #4
    Utente di HTML.it L'avatar di Xinod
    Registrato dal
    Sep 2000
    Messaggi
    13,649
    modifiche minime per farlo funzionare
    codice:
    <SCRIPT LANGUAGE="JavaScript">
    <!--
    function init() {
    	pulloutActive = 0
    	pullout1 = document.getElementById('pulloutContent1').style
    	pullout2 = document.getElementById('pulloutContent2').style
    	pullout3 = document.getElementById('pulloutContent3').style
    	pullout4 = document.getElementById('pulloutContent4').style
    	pulloutShown = pullout1		// the layer that is currently shown
    	pulloutShown.xpos = 0
    	pulloutNew = "none"			// the layer that we will be shown next
    	pulloutNew.xpos = -285
    }
    // Pullout Function, starts the sequence
    function pullout(which) {
    	if (!pulloutActive && pulloutShown != which) {
    		pulloutActive = 1  // this makes it so you can't start it again until it's finished
    		pulloutNew = which
    		pulloutNew.xpos = -285
    		pulloutLeft()
    	}
    }
    
    // Slide the old layer out of view
    function pulloutLeft() {
    	if (pulloutShown.xpos > -285) {
    		pulloutShown.xpos -= 15
    		pulloutShown.left = pulloutShown.xpos+'px'
    		setTimeout("pulloutLeft()",30)
    	}
    	else {
    		hide(pulloutShown)
    		show(pulloutNew)
    		setTimeout("pulloutRight()",50)
    	}
    }
    
    // Slide the new layer into view
    function pulloutRight() {
    	if (pulloutNew.xpos < 0) {
    		pulloutNew.xpos += 15
    		pulloutNew.left = pulloutNew.xpos+'px'
    		setTimeout("pulloutRight()",30)
    	}
    	else {
    		pulloutShown = pulloutNew
    		pulloutActive = 0  // stops the sequence
    	}
    }
    // Show/Hide Functions
    function show(showobj) {
    	showobj.visibility = "visible"
    }
    function hide(hideobj) {
    	hideobj.visibility = "hidden"
    }
    
    //-->
    </SCRIPT>

  5. #5
    SEI A DIR POCO UN GENIO...

    BRAVISSIMO...

    GRAZIE MILLE
    TOMMASO

  6. #6
    Ma come faccio a far apparire come prima scheda la scheda 2 o un altra a mia scelta???

    Adesso ogni volta che chiamo la pagina la prima scheda aperta à la 1...

    Grazie
    Tommaso

  7. #7
    SOLUZIONE TROVATA

    Basta modificare il foglio di stile cosi

    #pulloutContent1 {position:absolute; left:-285; top:0; width:285; height:240; clip:rect(0,285,240,0); background-color:#C5C5C5; layer-background-color:#C5C5C5; visibility:hidden;}

    Mentre lo script cosi

    pullout2.visibility = "visible"
    pullout2.left = 0
    pulloutShown = pullout2
    pulloutShown.xpos = 0

    Naturalmente se si vuol far apparire prima la scheda 3 bisogna mettere pullout3.

    Grazie Mille
    Tommaso

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.