[TriLUG] javascript syntax

Jim Ray jim at neuse.net
Sun Mar 20 13:44:34 EST 2005


I've got a scrolling text testimonial thingie on my web site and can't 
figure out the syntax to insert a carriage return linefeed between the 
quote and the person's name.  I can encapsulate the whole function with 
HTML yet am dealing with only text strings inside the script.  Any 
ideas?  I've tried /n, /r/n and <br> to no avail.  The script is 
appended below.

Regards,

Jim

-- 
Jim Ray, President
Neuse River Network, Inc.

tel: 919-838-1672 x111
toll free: 800-617-7652
http://www.Neuse.Net

Ask about our Clean Networks.  Established in the Triangle 1997.

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Original:  Bob Simpson (webmaster at maryjanebrown.net) -->
<!-- Web Site:  http://www.maryjanebrown.net/webmaster -->

<!-- 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.\"\n\nJack Peacock, President/CEO\n\nCustom 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.\"\n\nClint Parrish\n\nNatvar";
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.\"\n\nSteve Steele, President\n\nMindbender 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.\"\n\nLee Tyler\n\nNEC";
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.\"\n\nLee Moody, President\n\nDelta 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.\"\n\nChristine Carlisle Odom, Founder\n\nTrees 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!\"\n\nCarl B. Mims, Jr., President\n\nCBM Enterprises, LLC";
textStr[7] = "\"I really appreciate your focus on customer service and your technical skills.\"\n\nTim Hazlehurst\n\nExploris";
if (document.layers) {
document.write('<ilayer id="NS4message" height=25 width=100%><layer id="NS4message2" height=25 width=100%></layer></ilayer>')
temp = 'document.NS4message.document.NS4message2.document.write(beforeMsg + textStr[i++] + afterMsg);'+
'document.NS4message.document.NS4message2.document.close()';
}
else if (document.getElementById) {
document.write(beforeMsg + '<div id="message" style="position:relative;">IE division</div>' + afterMsg);
temp = 'document.getElementById("message").firstChild.nodeValue = textStr[i++];';
}
else if (document.all) {
document.write(beforeMsg + '<div id="message" style="position:relative;">IE division</div>' + afterMsg);
temp = 'message.innerHTML = textStr[i++];';
}
var i = 0;
function msgRotate() {
eval(temp);
if (i == textStr.length) i = 0;
setTimeout("msgRotate()", msgRotateSpeed);
}
window.onload = msgRotate;
//  End -->



More information about the TriLUG mailing list