Navigation Menu

What's New?
Alphabetical Listing
Site Contents


Site FAQ
About JSS
JavaScript Forum
JavaScript Tutorial
Friends of JSS

Link to Us
JavaScript Help
Contribute a script
Technology Jobs

Become a Partner

Internet.commerce

Be a Commerce Partner














Internet.com

IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

Developer Channel

FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

Great Sites

DocJavaScript.com
dhtml.com
The Freebie Directory
TheFreeSite.com

Browse Doc JS's Tips!


Hiermenus Central


Promotions

Free Announcements


Social Bookmark

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


User Comments

Add a comment, suggestion, or correction
[For questions about usage, consult the Notes tab above or visit the JavaScript forum. Do not include more than two (2) lines of code in your comments. If you have suggestions or corrections, you can submit them to us.]

    
   
       
[optional]
 
[optional]

   

Comments feed Comment Feed RSS 2.0

10. From: Andrew LeDawson
A Suggestion
11/25/2007 10:53:34

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.

11. From: Lee (Admin)
12/04/2007 10:43:38

It's just a simple matter of changing the array statements:

message[0] = "New message here"

Just change the array number ("[0]" for each one, as shown in the script.

Otherwise, there are comments in the script that give explanations.

9. From: G Liu
11/19/2007 14:37:50

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

7. From: claudia
10/26/2007 18:12:15

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

8. From: Lee (Admin)
11/07/2007 15:49:06

Due to the limitations of these comments, you will need to submit your question to the JavaScript Forum for further help.

5. From: Karen Philhower
display is different
08/22/2007 22:33:03

I followed the instructions exactly but ended up with a multi-line text area that has a vertical scroll bar. This is NOT the look I wanted to create and the sample on this web site doesn't have it. Any suggestions?

6. From: Lee (Admin)
10/03/2007 14:45:43

You will need to submit your question to the JavaScript Forum for further help.

1. From: Rich Sagall
Adding links
06/05/2007 13:40:18

This may be a simple question as I am a beginner with JavaScript. I like this script and want to alter it so the words that appear in the box are hot links. I tried changing

message[0] = "Welcome to the JavaScript Source!"

to read

message(0) = "Home Page"

and also

message(0) = "Home Page"

and neither worked.

Any suggestions?

Thanks,

Rich

2. From: Lee (Admin)
06/05/2007 14:31:38

Rich,

You need to submit your question to the JavaScript Forum.

3. From: Rita Gipp
need closing form tag
06/01/2007 10:14:09

Your script needs a closing tag on the form command in the body script.
Thanks for the script!

next comments...

Do you write JavaScripts?
If you do, why not submit them to us?
We'll give you credit and a link back to your Web site.