Results 1 to 3 of 3

Thread: Help with scroll bar

  1. #1
    Join Date
    Mar 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Help with scroll bar

    1) Script Title: Page Scroller

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...gescroller.htm

    3) Describe problem: I am trying to use the scroll bar provided by this site, but can't seem to make only the text in the right column of a frame scroll. Instead, the whole page scrolls. Any ideas on what to do?
    Thanks
    Last edited by bizzy; 04-03-2008 at 10:48 AM.

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Its all scrolling because the scroll() function make the whole page scroll, atm I think that your script is in the frame and you wanna scroll a div in there.
    I think what you need to do is change this line:
    Code:
    window.scrollBy(0,myspeed)
    Change the selected to:
    Code:
    document.getElementById('id').
    And then change selected again with the div id.
    Jeremy | jfein.net

  3. #3
    Join Date
    Mar 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Scrol buttons in table

    Hello. Thanks so much for the reply. I am very new to HTML. Here is the source code. I need to make the images Z1 and Z2 scroll the text in the right column. Would very much appreciate some help! Which changes should I make and where?:

    <head>
    <title></title>
    <link href="file:///C:/Users/bizzcommunications/Firma/Website_neu/site_html/style.css" rel="stylesheet" type="text/css" />
    <csscriptdict import="import">
    <script type="text/javascript" src="file:///C:/Dokumente und Einstellungen/abc/Anwendungsdaten/Adobe/Adobe GoLive/Settings8/JScripts/GlobalScripts/CSScriptLib.js"></script>
    </csscriptdict>
    <csactiondict>
    <script type="text/javascript"><!--
    var preloadFlag = true;

    // --></script>
    </csactiondict>
    </head>
    <body id="page3">
    <table class="w">
    <tr>
    <td class="main">
    <table class="main1">
    <tr>
    <td class="bg"></td>
    <td class="bg1">
    <table class="bg2">
    <tr>
    <td class="pad">
    <table class="w1">
    <tr>
    <td id="header"><a href="file:///C:/Users/bizzcommunications/Firma/Website_neu/site_html/index1.html"><img alt="" src="file:///C:/Users/bizzcommunications/Firma/Website_neu/site_html/images/logo.png" class="logo" /></a></td>
    </tr>
    <tr>
    <td>
    <table id="content">
    <tr>
    <td>
    <a onclick="changeImages('menu_normal','file:///C:/Users/bizzcommunications/Firma/Website_neu/site_html/images/menu-click.gif');" onmouseover="changeImages('menu_normal','file:///C:/Users/bizzcommunications/Firma/Website_neu/site_html/images/menu-click.gif');return true" onmouseout="changeImages('menu_normal','file:///C:/Users/bizzcommunications/Firma/Website_neu/site_html/images/menu_normal.gif');return true" href="file:///C:/Users/bizzcommunications/Firma/Website_neu/site_html/index1.html"><img id="menu_normal" alt="" src="file:///C:/Users/bizzcommunications/Firma/Website_neu/site_html/images/menu_normal.gif" name="menu_normal" /></a><br />
    <table class="table">
    <tr>
    <td class="indent_main">
    <table class="w2">
    <tr>
    <td class="col1">
    <div class="indent">
    <p><img alt="" src="file:///C:/Users/bizzcommunications/Firma/Website_neu/site_html/images/3_w1.gif" class="title" /></p>
    </div>
    <div class="indent">
    <strong><span class="firmenname">bizz communications </span></strong>bietet diverse Sprachedienstleistungen für Wirtschaft und Werbung aus einer Hand.
    <p>Wir halten ein umfangreiches Dienstleistungsangebot für Ihre Kommunikationslösungen bereit: von Werbetexten jeglicher Art über Corporate Design Manuals, Broschüren und Finanzkommunikation (zum Beispiel Geschäftsberichte) bis hin zu technischen Handbüchern und juristischen Dokumenten. </p>
    <p>Wir bringen Ihre Kommunikationsmittel in Form.</p>
    <p><img alt="" src="file:///C:/Users/bizzcommunications/Firma/Website_neu/site_html/images/3_pl.jpg" class="pic" /></p>
    </div>
    </td>
    <td class="col2"><img alt="" src="file:///C:/Users/bizzcommunications/Firma/Website_neu/site_html/images/3_w2.gif" class="title" />
    <div class="indent">
    <img alt="" src="file:///C:/Users/bizzcommunications/Firma/Website_neu/site_html/images/3_k.jpg" class="pic" /><a href="#">KORREKTORAT</a><br />
    Prüfung hinsichtlich Orthografie, Grammatik und Interpunktion.<br style="clear:both" />
    <img alt="" src="file:///C:/Users/bizzcommunications/Firma/Website_neu/site_html/images/3_l.jpg" class="pic" /><a href="#">LEKTORAT</a><br />
    Umfasst Korrektorat und zusätzliche Prüfung auf Einheitlichkeit,*Verständlichkeit, logischen*Aufbau und Stil.<br />
    <br style="clear:both" />
    <img alt="" src="file:///C:/Users/bizzcommunications/Firma/Website_neu/site_html/images/3_r.jpg" class="pic" /> <a href="#">REVISION</a><br />
    Prüfung auf Fehler, die während des Layoutprozesses oder der Druckvorbereitungen entstehen.<br style="clear:both" />
    <img alt="" src="file:///C:/Users/bizzcommunications/Firma/Website_neu/site_html/images/3_a.jpg" class="pic" /> <a href="#">ADAPTION/ÜBERSETZUNG</a><br />
    Anpassung eines Textes an einen bestimmten Markt beziehungsweis <br style="clear:both" />
    <img alt="" src="file:///C:/Users/bizzcommunications/Firma/Website_neu/site_html/images/3_g.jpg" class="pic" /> <a href="#">GLOSSARERSELLUNG</a><br />
    Zur Sicherstellung der Einhaltung einer Corporate Language.<br style="clear:both" />
    <img alt="" src="file:///C:/Users/bizzcommunications/Firma/Website_neu/site_html/images/3_s.jpg" class="pic" /> <a href="#">DESKTOP*PUBLISHING</a><br />
    Das digitale Setzen von*Dokumenten am Computer.
    <div class="fr">
    </div>
    <div id="staticbuttons" style="position:absolute;">
    <a href="javascript:" onmouseover="myspeed=-thespeed" onmouseout="myspeed=0"><img
    src="file:///C:/Users/bizzcommunications/Firma/Website_neu/site_html/images/z1.gif" border="0"></a>

    <script>

    //Page Scroller (aka custom scrollbar)- By Dynamic Drive
    //For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
    //This credit MUST stay intact for use

    var Hoffset=70 //Enter buttons' offset from right edge of window (adjust depending on images width)
    var Voffset=80 //Enter buttons' offset from bottom edge of window (adjust depending on images height)
    var thespeed=3 //Enter scroll speed in integer (Advised: 1-3)

    var ieNOTopera=document.all&&navigator.userAgent.indexOf("Opera")==-1
    var myspeed=0

    var ieHoffset_extra=document.all? 15 : 0
    var cross_obj=document.all? document.all.staticbuttons : document.getElementById? document.getElementById("staticbuttons") : document.staticbuttons

    function iecompattest(){
    return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
    }

    function positionit(){
    var dsocleft=document.all? iecompattest().scrollLeft : pageXOffset
    var dsoctop=document.all? iecompattest().scrollTop : pageYOffset
    var window_width=ieNOTopera? iecompattest().clientWidth+ieHoffset_extra : window.innerWidth+ieHoffset_extra
    var window_height=ieNOTopera? iecompattest().clientHeight : window.innerHeight

    if (document.all||document.getElementById){
    cross_obj.style.left=parseInt(dsocleft)+parseInt(window_width)-Hoffset+"px"
    cross_obj.style.top=dsoctop+parseInt(window_height)-Voffset+"px"
    }
    else if (document.layers){
    cross_obj.left=dsocleft+window_width-Hoffset
    cross_obj.top=dsoctop+window_height-Voffset
    }
    }

    function scrollwindow(){
    window.scrollBy(0,myspeed)
    }

    function initializeIT(){
    positionit()
    if (myspeed!=0){
    scrollwindow()
    }
    }

    if (document.all||document.getElementById||document.layers)
    setInterval("initializeIT()",20)

    </script>
    <a href="javascript:" onmouseover="myspeed=thespeed" onmouseout="myspeed=0"><img
    src="file:///C:/Users/bizzcommunications/Firma/Website_neu/site_html/images/z2.gif" border="0"></a><br>
    </div>
    <br style="clear:both" />
    </div>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    <tr>
    <td id="footer">bizz communications © 2008 |<a href="file:///C:/Users/bizzcommunications/Firma/Website_neu/site_html/index-7.html"> impressum</a></td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </td>
    <td class="bg"></td>
    </tr>
    <tr>
    <td class="bg" colspan="3"></td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </body>
    </html>

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •