DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: newbee having trouble with java scripts

  1. #1
    Join Date
    Feb 2009

    newbee having trouble with java scripts

    I am trying to use 2 copies of Free Javascript Vertical Text Scroller v2.2 on the same page. It seems that they interact I can control one with the other.
    How can I have the act independently. I have placed a copy of the script below.Using a wysiwg web site bulider.. not to good with scripts
    Thanks in advance for your help.
    <title>Free Javascript Vertical Text Scroller v2.2</title>
    <!-- STEP I: Goes between <HEAD> & </HEAD> tags 
                 You may keep it, change or ignore it!
                 Or linking to an External Style Sheet:
             <LINK REL=StyleSheet HREF="yourstyle.css"> 
                 without other style tags -->
    <style type="text/css">
    A { text-decoration:none;}
    A:link	{color:blue;}
    A:visited{color: blue;}
    A:hover	{color: red;background-color:#66ffff;}
     .tanc {FONT-WEIGHT: bold;FONT-SIZE: 10px; COLOR: navy; FONT-FAMILY: Arial,Helvetica; TEXT-ALIGN: center;}
     .tabb { font-weight:bold; font-size:14px; font-family:Arial,Helvetica;TEXT-ALIGN: center;}
     .tac { font-weight:bold; font-size:12px; font-family:Arial,Helvetica;TEXT-ALIGN: center;}
    <!-- STEP II: Goes between <HEAD> & </HEAD> tags
                  Or linking to an External js file:
    <script language="javascript" src="yourfile.js"></script>
                  without other script tags -->
    <SCRIPT LANGUAGE="JavaScript">
    *   This notice may not be removed 
    //-- Begin Scroller's Parameters and message -->
    //scroller width: change to your own;
    var swidth=290;
    //scroller height: change to your own;
    var sheight=80;
    //background color: change to your own; 
    var sbcolor="#ccffcc";
    //scroller's speed: change to your own;
    var sspeed=2;
    var restart=sspeed;
    //text: change to your own
    wholemessage='<table align="center"><tr><td><A class=tabb target="_self" href="">Javascript Vertical Scroller 7.0</A></td></tr></table><div class=tanc>Multiple Messages may scroll & pause along 2 patterns:<br>- Singles: pause at top or may automatically be centered.<br>- One_or_More-up-to-area-size: Messages go equidistant<br>  each&every message pausing when reaches top edge.</div><table align="center"><tr><td align="center"><A class=tabb target="_self" href="">Javascript Horizontal Scroller 7.0</A></td></tr></table><div class=tanc>Multiple Messages may scroll & pause along 2 patterns:<br>- Singles: pause at left or centered depending upon CSS.<br>- One_or_More-up-to-area-size: Messages go equidistant<br>  each&every message pausing when reaches left edge.</div><table align="center"><tr><td><A class=tabb target="_self" href="">Javascript Typewriter Scroller 5.0</A></td></tr></table><div class=tanc>Typewriter ticker has 2 portions: typewriting & scrolling<br>with first one at the bottom - Scrolling portion is optional.</div><br /><div class=tanc><b><u>Javascript Vertical Text Scroller v2.2:</u></b><br><b>On Windows/Linux:</b><br>ie4+ firefox1+ ns6+ opera7+ ns4+.<br><br><b>On Mac OS X</b>:<br>Safari, ie5+ firefox1+ opera7+.<br><br>Any message may be <b><i>as large as desired.</i></B><br>===<br><br><font color="olive">Any wider row will automatically be adjusted into as many rows as to fit the width you set for the scrolling area.</font><br><br>===<br>One may use <b><i>any basic HTML code.</i><br><br>===</B></div></div>';
    //-- end Parameters and message -->
    //-- begin: Scroller's Algorithm -->
    function goup(){if(sspeed!=rspeed*8){sspeed=sspeed*2;restart=sspeed;}}
    function godown(){if(sspeed>rspeed){sspeed=sspeed/2;restart=sspeed;}}
    function start(){if(document.getElementById)ns6marquee(document.getElementById('slider'));else if(document.all)iemarquee(slider);else if(document.layers)ns4marquee(document.slider1.document.slider2);}function iemarquee(whichdiv){iediv=eval(whichdiv);"px";iediv.innerHTML=wholemessage;sizeup=iediv.offsetHeight;ieslide();}function ieslide(){if(>=sizeup*(-1)){"px";setTimeout("ieslide()",100);}else{"px";ieslide();}}function ns4marquee(whichlayer){ns4layer=eval(whichlayer);;ns4layer.document.write(wholemessage);ns4layer.document.close();sizeup=ns4layer.document.height;ns4slide();}function ns4slide(){if(>=sizeup*(-1)){;setTimeout("ns4slide()",100);}else{;ns4slide();}}function ns6marquee(whichdiv){ns6div=eval(whichdiv);"px";ns6div.innerHTML=wholemessage;sizeup=ns6div.offsetHeight;ns6slide();}function ns6slide(){if(parseInt(>=sizeup*(-1)){"px";setTimeout("ns6slide()",100);}else{"px";ns6slide();}}
    //-- end Algorithm -->
    <!-- End of Script between <head> & </head> tags-->
    <!-- STEP III: Make sure start() is loaded.
    If you have in your page multiple "onload" events, place them
    all using one onload event handler within BODY TAG, like this: 
    onload="Funct1(); Funct2(); ...;" 
    Or use this:
    function alltostart() { 
    window.onload = alltostart;
    <body onload="start();">
    <!-- STEP IV: Goes between <BODY ... > & </BODY> tags
                  begin: body code  -->
    <!-- You may remove last cell below (<td> ... </td>) to get rid of Speed-change -->
    <script language="JavaScript">document.write('<table border="2" align="center"><tr><td width='+swidth+'px>');if (document.getElementById || document.all){document.write('<span style="height:'+sheight+'px;"><div style="position:relative;overflow:hidden;width:'+swidth+'px;height:'+sheight+'px;clip:rect(0 '+swidth+'px '+sheight+'px 0);background-color:'+sbcolor+';" onMouseover="sspeed=0;" onMouseout="sspeed=restart"><div id="slider" style="position:relative;width:'+swidth+'px;"></div></div></span>')}</script>
    <ilayer width=&{swidth}; height=&{sheight}; name="slider1" bgcolor=&{sbcolor};><layer name="slider2" width=&{swidth}; onMouseover="sspeed=0;" onMouseout="sspeed=restart"></layer></ilayer></td><td bgcolor="#ffffcc"><div><A class=tabb href="#" onMouseOver="goup();">UP</a></div><div class=tanc> <br />sp<br /> </div><div><a href="#" class=tabb onMouseOver="godown();">DN</a></div></td></tr></table>
    <!-- end of code between BODY TAGS -->
    Last edited by Hack; 02-22-2009 at 12:20 PM. Reason: Added Code Tags

  2. #2
    Join Date
    Apr 2007
    Sterling Heights, Michigan
    Moved From The Lounge

Similar Threads

  1. java scripts
    By pfwebmaster in forum General Questions
    Replies: 0
    Last Post: 03-14-2007, 11:46 PM
  2. HTML and Excel integration using Java scripts
    By MadhuP in forum VB Classic
    Replies: 1
    Last Post: 01-03-2007, 01:48 AM
  3. Has Sun Given Up on the Desktop?
    By Lori Piquet in forum Talk to the Editors
    Replies: 114
    Last Post: 10-10-2002, 06:01 AM
    By Dharmesh in forum .NET
    Replies: 4
    Last Post: 10-01-2001, 03:47 PM
  5. Java Developers and Java Architect for exciting projects in Chicago area
    By Keith Franklin, MCSD in forum java.announcements
    Replies: 0
    Last Post: 08-18-2000, 06:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center