[TriLUG] javascript syntax

Jim Ray jim at neuse.net
Mon Mar 21 21:52:45 EST 2005


dude...good job!  it works like a charm.  my sincere thanks.

Jim Wright wrote:

>Jim,
>I'm not sure how writing layers handles the breaks, but the <BR> get
>rendered if you have an existing div and use the innerHTML
>attribute...here is the code:
>-jim
>
><script>
><!-- Begin
>var beforeMsg = "<font COLOR=red>";
>var afterMsg = "</font>";
>var msgRotateSpeed = 5000; // Rotate delay in milliseconds
>var textStr = new Array();
>textStr[0] = "\"The wireless system connecting our two buildings for the
>first time allows us to communicate effectively. Thanks
>again.\"<BR><BR>Jack Peacock, President/CEO<BR><BR>Custom Assemblies,
>Inc."; 
>textStr[1] = "\"Your quality of service and professionalism have allowed
>all of us to be efficient when performing our jobs. Thanks for all you
>do.\"<BR><BR>Clint Parrish<BR><BR>Natvar"; 
>textStr[2] = "\"You got us up and running in no time, upgraded our
>systems and we were still able to deliver our client projects ahead of
>schedule. Thanks for saving our system.\"<BR><BR>Steve Steele,
>President<BR><BR>Mindbender Studios"; 
>textStr[3] = "\"The database information would have taken hours for us
>to recreate even if we still had the original hard copy input.  We found
>ourselves needing a quick solution and you delivered.\"<BR><BR>Lee
>Tyler<BR><BR>NEC"; textStr[4] = "\"Since you installed our initial
>cabling plant when we moved into our current facilities in 1998, you
>have been a great help to us with our information technology
>needs.\"<BR><BR>Lee Moody, President<BR><BR>Delta Dental Plan of NC"; 
>textStr[5] = "\"Trees Across Raleigh has really appreciated your setup
>and ongoing assistance over the years. It has been a great help to have
>a consistent and timely resource.\"<BR><BR>Christine Carlisle Odom,
>Founder<BR><BR>Trees Across Raleigh, Inc."; 
>textStr[6] = "\"I would never hesitate to recommend the services of
>Neuse River Network to anyone needing computer and or software services.
>They are the best!\"<BR><BR>Carl B. Mims, Jr., President<BR><BR>CBM
>Enterprises, LLC"; 
>textStr[7] = "\"I really appreciate your focus on customer service and
>your technical skills.\"<BR><BR>Tim Hazlehurst<BR><BR>Exploris";   
>var i = 0; 
>function msgRotate() { 
>document.getElementById("foo").innerHTML = beforeMsg + textStr[i++] +
>afterMsg;
>if (i == textStr.length) i = 0; 
>setTimeout("msgRotate()", msgRotateSpeed); 
>} 
>window.onload = msgRotate; //  End -->
></script>
><div id="foo"> </div>
>  
>


More information about the TriLUG mailing list