Results 1 to 3 of 3

Thread: Vertical Scroll - Marquee

  1. #1
    Join Date
    Jun 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Vertical Scroll - Marquee

    Hello,

    I would like to know how

    Can the content of a vertical scroll be set to be continually scrolled in a loop, without a blank space in the scroll content?

    I found some code on this forum which deals with horizontal scroll. I am hoping someone will help me with the vertical one instead.

    Thanks!

  2. #2
    Join Date
    Jun 2006
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi

    You can use the code below to vertically scroll the contents.

    <html>
    <style type="text/css">
    #marqueecontainer
    {
    position: relative;
    width: 200px; /*marquee width */
    height: 200px; /*marquee height */
    background-color: white;
    overflow: hidden;
    border: 3px solid black;
    padding: 2px;
    padding-left: 4px;
    }

    </style>
    <script type="text/javascript">
    var delayTime=500
    var marqueeSpeed=2
    var pauseTime=1
    var copySpeed=marqueeSpeed
    var pauseSpeed=(pauseTime==0)? copySpeed: 0
    var actualHeight=''

    function ScrollMarquee()
    {
    if (parseInt(crossMarquee.style.top)>(actualHeight*(-1)+8))
    crossMarquee.style.top=parseInt(crossMarquee.style.top)-copySpeed+"px"
    else
    crossMarquee.style.top=parseInt(marqueeheight)+8+"px"
    }

    function InitializeMarquee()
    {
    crossMarquee=document.getElementById("vmarquee")
    crossMarquee.style.top=0
    marqueeheight=document.getElementById("marqueecontainer").offsetHeight
    actualHeight=crossMarquee.offsetHeight
    if (window.opera || navigator.userAgent.indexOf("Netscape/7")!=-1)
    {
    crossMarquee.style.height=marqueeheight+"px"
    crossMarquee.style.overflow="scroll"
    return
    }
    setTimeout('lefttime=setInterval("ScrollMarquee()",30)', delayTime)
    }

    if (window.addEventListener)
    window.addEventListener("load", InitializeMarquee, false)
    else if (window.attachEvent)
    window.attachEvent("onload", InitializeMarquee)
    else if (document.getElementById)
    window.onload=InitializeMarquee


    </script>
    <div id="marqueecontainer" onMouseover="copySpeed=pauseSpeed" onMouseout="copySpeed=marqueeSpeed">
    <div id="vmarquee" style="position: absolute; width: 98%;">
    Syncfusion - Dotnet Essentials - Visit as in www.syncfusion.com
    </div>
    </div>
    </html>

    Please let me know if you have any doubts.


    Regards,
    Vallim

  3. #3
    Join Date
    Jun 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Vertical Scroll - Marquee

    That script works fine. But, when u have lets say 5 messages, after the 5th message scrolls the screen goes blank (white) until the first message scrolls back. I hope u understand what I mean. Its that white space I want to get rid off and have all five messages scroll and without a pause follow it with the first one as well.

    Thanks again.

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
  •