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

    Scrolling orizzontale custom

    ciao a tutti,

    Cercavo uno script per effettuare lo scrolling orizzontale con pulsanti customizzati ma non sono riuscito a trovare nulla...

    Sapete dove posso trovare qualcosa a riguardo ?

    Grazie
    SGr33n

  2. #2
    Utente di HTML.it L'avatar di badaze
    Registrato dal
    Jun 2002
    residenza
    Lyon
    Messaggi
    5,372
    Prova questo (bisogna mantenere il click sui pulsanti)

    codice:
    <HTML>
    <HEAD>
    	<TITLE>Selezione da una lista digitando i caratteri in un TextBox</TITLE>
    
    <style type="text/css">
    <!--
    .inverted {color:white;background-color:navy} 
    -->
    </style>
    
    <SCRIPT>
    <!--
    //var previousCell = null;
    
    
    var stopScrollLeft=true;
    var stopScrollRight=true;
    
    var aliasContainer = null;
    var aliasTable = null;
    
    var scrollStep= 2;
    
    function pippo() {
     if (aliasContainer == null || aliasTable == null) {
     // return;
     } // if (aliasContainer == null || aliasTable == null)
     if (! stopScrollLeft) {
      document.getElementById('t').value = aliasContainer.scrollLeft;
      ScrollLeft();
     } // if (! stopScrollLeft)
     if (! stopScrollRight) {
      document.getElementById('t').value = aliasContainer.scrollLeft; 
      ScrollRight();
     } // if (! stopScrollRight)
    } // function pippo()
    
    window.setInterval("pippo()",15);
    
    function ScrollLeft() {
     if (aliasContainer.scrollLeft > 0) {
      aliasContainer.scrollLeft -= scrollStep;
     } else {
      aliasContainer.scrollLeft = 0;
    	return;
     } // if (aliasContainer.scrollTop > 0)
    } // function ScrollLeft()
    
    
    function ScrollRight() {
     if (aliasContainer.scrollLeft <= aliasTable.offsetWidth - aliasContainer.offsetWidth) {
      aliasContainer.scrollLeft+= scrollStep;
     } // if (aliasContainer.scrollLeft <= aTable.offsetWidth - aliasContainer.offsetWidth)
    } // function ScrollRight()
    
    function stopScroll() {
     stop = true;
    } // function stopScroll()
    
    function setScrollObjects(aContainer,aTable) {
     aliasContainer = aContainer;
     aliasTable     = aTable;
    } // function setScrollObjects(aContainer,aTable)
    
    //-->
    </SCRIPT>
    
    </HEAD>
    <BODY id="body" BGCOLOR="#ffffff">
    
    
    
    <DIV ID="a" STYLE="height:50px; width:300;z-index=100;font-family:verdana;font-size:3pt;overflow: hidden;">
     <TABLE ID="b" NAME="stati" BORDER="0">
     <TR>
      <TD width="1000" NOWRAP>Aaaaaaaaaaa ddddddd eeeeeeeeee  rrrrrrrrrr ttttttttt ddddddddddddddvd dddddddd   dddddddddddssssssss s s  j jjjjjjjjji                  </TD>
     </TR>
     </TABLE>
    </div>
    <input type="button" id="upa" value="Up" onmousedown="if (event.button==1) {stopScrollLeft=false;setScrollObjects(document.getElementById('a'),document.getElementById('b'));}" onmouseup="stopScrollLeft=true;setScrollObjects(null,null);">
    <input type="button" id="downa" value="Down" onmousedown="if (event.button==1) {stopScrollRight=false;setScrollObjects(document.getElementById('a'),document.getElementById('b'));}" onmouseup="stopScrollRight=true;setScrollObjects(null,null);">
    
    
    <input type="text" id="t">
    </BODY>
    </HTML>

  3. #3
    Grazie potrebbe essere buono, ma si blocca una volta cliccato sul pulsante... cioè non si ferma più lo scrolling, arriva alla fine.
    SGr33n

  4. #4
    Utente di HTML.it L'avatar di badaze
    Registrato dal
    Jun 2002
    residenza
    Lyon
    Messaggi
    5,372
    Con IE 6 non succede

  5. #5
    io l'ho provato solo con ie6 finora
    SGr33n

  6. #6
    Utente di HTML.it L'avatar di badaze
    Registrato dal
    Jun 2002
    residenza
    Lyon
    Messaggi
    5,372
    Sei sicuro di non avere delle righe tagliate in mezzo ?

  7. #7
    ho provato il tuo codice perfettamente come è, ma l'ho provato anche con firefox e lì non funziona, quindi non penso faccia tanto al caso :\ Ti ringrazio ugualmente
    SGr33n

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.