JavaScript – Message/Text Scroller

This is a JavaScript to scroll a list of messages or texts to save spaces on your web page. It will show a text one after another from a list which can be displayed in a single DIV or INPUT element. It is best to implement this one for news texts and texts ads.



Click the button to play the scroller

Source Code

        <script language="JavaScript">
            //List your messages here
            var msg = new Array();
            msg[0] = "This is message 1";
            msg[1] = "This is message 2";
            msg[2] = "This is message 3";

            //Here's the function to scroll your messages
            function play(num){
                //Check whether it reach your last message
                //to go back to the first message
                if(num >= msg.length)
                    num = 0;

                //Variable declarations
                var tmp_elm = document.getElementById("div_display");
                var tmp = tmp_elm.innerHTML;
                var tmp_next;

                //Scrolling process
                var random = Math.floor(Math.random() * msg[num].length);
                var tmp_chr = msg[num].charAt(random);
                if(tmp == msg[num]){
                if(tmp_chr == tmp.charAt(random)){

                //Preparing output
                var first_part = tmp.substring(0,random);
                var last_part = tmp.substring(random,msg[num].length);
                var tmp_next = first_part + tmp_chr + last_part;
                tmp_elm.innerHTML = tmp_next;

                //Recall play
    <body onload="play(0);">
        <div id="div_display">SCROLLED MESSAGES</div>

Incoming Search Terms

testimonial scroller script, testimonials slider in javascript, scrolling testimonials javascript, javascript testimonial scroller, testimonials slider script, javascript scrolling testimonials, wp scroller, javascript message scroller, wp text scroller, testimonial scroller javascript, javascript scrolling random messages that work in firefox -vir, testimonials scroller javascript, javascript scrolling message, quote scroller javascript, testimonial scroller for wp, testimonial scroller java script, text scroller, wordpress free plugin scrolling text, javascript scroll random list, javascript message list, text scroller js aleatorio, scroll text one after another, text testimonial slider javascript, rolling testimonal text, Scroller javascript random, scrolling the text one after another with code, scrolling testimonials#, scrolling testimonials wordpress plugin, scrolling arrays in javascript, scrolling random text with links javascript, scrolling random text javascript, testimonial scroller on website, scrolling random link javascript, scrolling of text in javascript one after another, scroller msg, scrolling message javascript, sliding text one after the other in html, testimonial scroll text, wordpress widget text scrollbar, widget displaying text one after other, testimonial scroller webpage codee, testimonial scrolling script, why testimonial scrolling JAVASCRIPT, textscroller javascript, testimonial text scrolling script, testimonials on website one by one in scroll, testimonials scroller 3 javascript for text, texts scroller, text xcrolling in wp, testimonials text scrolling, text one after other in html, javascript array text print msg[1], javascript scrolling list random order, javascript scrolling christman lights, javascript scroll list random start, javascript rolling testimonials, javascript random scroller, javascript messagelist, javascript message text slide, javascript message, javascript list of message, javascript for testimonioals, javascript slide testimonials, Java Script Text-Scroller, https://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1887 vCbMTcdjX_5dStWw8wqA8jbAXETL1lKcdPvPlMHcBis 32bc15cd7473a3bada5067eae7e1be6c401c1186&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXmeppkgUc0YMIVJNtoWDTa6C, html sliding text one after another, html scrolling text one after another, html scrolling testimonial text, html scroll random text, how to avoid randomstart in textslide using javascript code, free script text scrolling demo, free javascript rss scrolling text, random list java scrolling, script for scroller message, rss scroll text with javascript, display the testimonials one after another on my website, random text scroller javascript, random text scroller, random testimonial text javascript, random testimonial scroller, random scrolling text script, random quote javascript scroller, scroll text testimonial, random javascript scrolling different texts, php testimonials scroller, php scrolling testimonial, one after another text scrolling in html code, message scroller, latest css text scrolling demo, js testimonial scroller, javascript testimonials slider add author, javascript slider with random text, Xhanch, Xhanch Studio

Posted on 2010-04-22 by Susanto BSc in Free Script, JavaScript
Javascript, Free, Script, Code, Animate, Scroll, Scroller, Xhanch, Xhanch Studio

Tagged as: , , , , , ,

Leave a Reply

You must be logged in to post a comment.