Alternating Message Text Box | JavaScriptSource

Alternating Message Text Box

Sandeep Gangadharan May 25, 2007


With the help of this script you can put up a text box on your Web page that displays alternating messages for your visitors. It saves space, as a lot of text can be contained in a minimal display area.


Source Code

Paste this source code into the designated areas.

External file

Paste this code into an external JavaScript file named: altTextBox.js


Paste this code into your external CSS file or in the <style> section within the HEAD section of your HTML document.


Paste this code into the HEAD section of your HTML document.


Paste this code into the BODY section of your HTML document

Leave a Response


I can't get rid of the text area border completely. Can I?

A Jun 11, 2014

It's just a simple matter of changing the array statements:[br /][br /] message&#91;0&#93; = "New message here"[br /][br /]Just change the array number ("&#91;0&#93;" for each one, as shown in the script.[br /][br /]Otherwise, there are comments in the script that give explanations.

Lee Dec 4, 2007

How about you, if possible, add comments in the external .js file showing how to use the file (changing the text to what you want to say) and things like that.

Andrew LeDawson Nov 25, 2007

very net and smoothy, this is best tab script among all i have searched for. allow me to copy it , :), thx.

G Liu Nov 19, 2007

Due to the limitations of these comments, you will need to submit your question to the [a href=""]JavaScript Forum[/a] for further help.

Lee Nov 7, 2007