Alternating Message Text Box | JavaScriptSource

Alternating Message Text Box

Sandeep Gangadharan May 25, 2007

General

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.


Notes

Source Code

Paste this source code into the designated areas.

External file

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


CSS

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


Head

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


Body

Paste this code into the BODY section of your HTML document


Leave a Response

(11 comments)

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="http://www.webdeveloper.com/forum/forumdisplay.php?f=3"]JavaScript Forum[/a] for further help.

Lee Nov 7, 2007

I am only getting a multine-line text area that has a vertical scroll bar. What could be wrong?

claudia Oct 26, 2007