Visualizzazione dei risultati da 1 a 2 su 2
  1. #1
    Utente di HTML.it
    Registrato dal
    Mar 2009
    Messaggi
    5

    Ennesimo problema con scroller

    salve a tutti, questo è il mio primo post qui.

    ho spulciato mezzo web e tutto il forum, ma non sono riuscito a capire perchè questo codice:
    codice:
     
    var posizione= 1;
    
    function scorriA(id)
    {
    	window.document.getElementById('avn').style.backgroundColor= 'white';
    	
    	if((navigator.appName=="Netscape")||(navigator.appName=="Opera"))
    	{ 
    	prop=getComputedStyle(document.getElementById(id),''); 	
    	}
    	else
    	{
    	prop=document.getElementById(id).currentStyle.left; 
    	}
    	margineR=parseInt(prop.getPropertyValue('right'));
    	margineL=parseInt(prop.getPropertyValue('left'));
    
    	spola=window.document.getElementById(id);
    
    	if (margineL > -800)
    	{
    	spola.style.left=margineL-10;
    	setTimeout(function() {scorriA(id)}, 1);
    	}
    	else
    	{
    	window.document.getElementById('ind').style.backgroundColor= 'teal';
    	}	
    }
    
    function scorriD(id)
    {
    	window.document.getElementById('ind').style.backgroundColor= 'white';
    	
    	if((navigator.appName=="Netscape")||(navigator.appName=="Opera"))
    	{ 
    	prop=getComputedStyle(document.getElementById(id),''); 	
    	}
    	else
    	{
    	prop=document.getElementById(id).currentStyle.left; 
    	}
    	margineR=parseInt(prop.getPropertyValue('right'));
    	margineL=parseInt(prop.getPropertyValue('left'));
    
    	spola=window.document.getElementById(id);
    // 	alert(margineL);
    	if (margineL < 0 )
    	{
    	spola.style.left=margineL+10;
    	setTimeout(function() {scorriD(id)}, 1);
    	}
    	else
    	{
    	window.document.getElementById('avn').style.backgroundColor= 'teal';
    	}
    }
    mi restituisce "errore nell'interpretazione della proprietà left" in FF ma SOLO se lo uso in una pagina con diversi elementi, se creo una pagina apposta con solo gli elementi necessari per farlo funzionare allora va...
    sono alla frutta, le ho tentate tutte, dove sbaglio???

  2. #2
    Utente di HTML.it
    Registrato dal
    Mar 2009
    Messaggi
    5
    nessuna idea? sto impazzendo!

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.