Results 1 to 5 of 5

Thread: To make vertical scroll text in table

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2003
    Posts
    72

    To make vertical scroll text in table

    I have find the javascript here :

    http://javascript.internet.com/scrol...-scroller.html

    Does anyone knows how to make this script work if the webpage is designed to display in the middle of internet explorer? (For example to put it into a table).

    Please help

    Thanks.

    Stella
    Last edited by stellafung2000; Jul 15th, 2003 at 08:47 PM.

  2. #2
    Lively Member
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    96
    it's a script on it's own..
    just place it anywhere you want..

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jul 2003
    Posts
    72
    bekkel,

    I have tried to put it in the middle of the table but it doesn't work. It is because the location for the blank.gif location in the javascript is fixed in one area. And I don't know how to make it flexible to adopt the new location.

    Any new commend.

    Thanks

    Stella

  4. #4
    Lively Member
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    96

    Question

    blank.gif.??? that's not in the javasript your reffering to...

    <html>
    <head>
    <title>test for table</title>

    <SCRIPT LANGUAGE="JavaScript">
    <!-- Begin
    // THESE VARIABLES CAN BE CHANGED //
    var myMainMessage=".. it's so easy...easy....easy....easy...........easy...................!!!..... ";
    var speed=150;
    var scrollingRegion=50;

    // END CHANGEABLE VARIABLES //
    var startPosition=0;
    function mainTextScroller() {
    var mainMessage=myMainMessage;
    var tempLoc=(scrollingRegion*3/mainMessage.length)+1;
    if (tempLoc<1) {tempLoc=1}
    var counter;
    for(counter=0;counter<=tempLoc;counter++)
    mainMessage+=mainMessage;
    document.mainForm.mainTextScroller.value=mainMessage.substring(startPosition,startPosition+scrolling Region);
    startPosition++;
    if(startPosition>scrollingRegion) startPosition=0;
    setTimeout("mainTextScroller()",speed); }
    // End -->
    </script>

    </head>
    <body onLoad="mainTextScroller()">
    <center>

    <table border=1>
    <tr><td>

    <form name="mainForm">
    <input type="text" name="mainTextScroller" size="40" value>
    </form>

    </td></tr>
    </table>
    </body>
    </html>

    works fine with me..

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Jul 2003
    Posts
    72
    Thank you very much Bekkel!

    I also find a script that can scroll verticall. Have a look:

    <html>
    <head>
    <title>Untitled Document</title>

    </head>

    <body>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <table width="10%" border="1" align="center" cellpadding="0" cellspacing="0">
    <tr>
    <td>

    <script language="JavaScript1.2">



    //change the scrollers width (in pixels)
    var scrollerwidth=200
    //change the scrollers height
    var scrollerheight=100
    //change the scrollers scroll speed (larger is faster)
    var speed=3
    //change the scrollers contents
    var scrollercontents='<font face="Arial" color="000000" size="2"><b>Place your content here.<br> This is a test page

    to go to <a href="http://www.users.tpg.com.au/vincentf">FLASH FROM STELLA</a> This is a scrolling text</b></font>'

    if (document.all)
    document.write('<marquee direction="up" scrollAmount='+speed+'

    style="width:'+scrollerwidth+';height:'+scrollerheight+'">'+scrollercontents+'</marquee>')

    function regenerate(){
    window.location.reload()
    }
    function regenerate2(){
    if (document.layers){
    setTimeout("window.onresize=regenerate",450)
    intializescroller()
    }
    }

    function intializescroller(){
    document.vscroller01.document.vscroller02.document.write(scrollercontents)
    document.vscroller01.document.vscroller02.document.close()
    thelength=document.vscroller01.document.vscroller02.document.height
    scrollit()
    }

    function scrollit(){
    if (document.vscroller01.document.vscroller02.top>=thelength*(-1)){
    document.vscroller01.document.vscroller02.top-=speed
    setTimeout("scrollit()",100)
    }
    else{
    document.vscroller01.document.vscroller02.top=scrollerheight
    scrollit()
    }
    }

    window.onload=regenerate2
    </script>


    <ilayer width=&{scrollerwidth}; height=&{scrollerheight}; name="vscroller01">
    <layer name="vscroller02" width=&{scrollerwidth}; height=&{scrollerheight};></layer>
    </ilayer></td>
    </tr>
    </table>
    </body>
    </html>

    Thank you again for your help.

    Stella

Posting Permissions

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



Click Here to Expand Forum to Full Width