Important alert: (current site time 7/15/2013 1:20:20 PM EDT)
 

VB icon

A different kind of status

Email
Submitted on: 4/3/2001 8:54:26 PM
By: Rag  
Level: Beginner
User Rating: By 2 Users
Compatibility: JavaScript
Views: 10156
(About the author)
 
     This code basically adds a typed-in message on your status bar. I saw it on another site, but I restructured it (its in a total different code) and enhanced it (if the message on the original source code exceeded the status bar, it wouldn't display. But before I added the enhancement (basically just scrolls after a certain amount of characters), it was a few lines shorter. So I guess I did totally code it, but didn't exactly think of it myself. Very simple, but cool (IMO)
 
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.
				
'**************************************
' Name: A different kind of status
' Description:This code basically adds a typed-in message on your status bar. I saw it on another site, but I restructured it (its in a total different code) and enhanced it (if the message on the original source code exceeded the status bar, it wouldn't display. But before I added the enhancement (basically just scrolls after a certain amount of characters), it was a few lines shorter. So I guess I did totally code it, but didn't exactly think of it myself. Very simple, but cool (IMO)
' By: Rag
'
' Side Effects:although I haven't tested it, some browsers may not display it correctly.
'
'This code is copyrighted and has' limited warranties.Please see http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=2148&lngWId=14'for details.'**************************************

var wait = 50
//number of millseconds before next letter
var message = new Array()
//add more messages if needed
message[0] = "testing for the 1st time"
message[1] = "testing for the 2nd time"
message[2] = "testing for the 3rd time"
var numberofmsgs = 2 //number of messages above
/*this is the actual workings of the script, don't mess with it unless you know what you're doing*/
var currentmsg = 0
var next = 1
var speed = 0
var begin = 0
var end = 100
function scrollit(){
	if (currentmsg <= numberofmsgs){
		if (next <= message[currentmsg].length + 5){
			window.status = message[currentmsg].substring(0, next)
			next++
			if (next >= 100){
				window.status = message[currentmsg].substring(begin, end)
				begin++
				end++
			}
			if (next == message[currentmsg].length + 5){
				currentmsg++
				next = 0
			}
			speed = setTimeout("scrollit()", wait)
		}
		if (currentmsg == numberofmsgs + 1){
			currentmsg = 0
			begin = 0
		}
	}
}
scrollit();


Other 1 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Beginner category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

6/18/2002 4:10:09 PMAnwerZahid

Hey Man...really cool script ..really usefull...! Thnks to you and thnks to planet-source-code ofcourse
[www.anwer.cjb.net]
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.