Banner In Status Bar Of The Browser
Displaying the banner in the status bar of the Browser using Javascript
Create a form and add the Javascript function StatusBarBanner() to the JSHeader
of the form. Call the function StatusBarBanner(10) with a numeric value as
an argument. The text you want to display in the browser status bar which
scrolls, For that assign the strings to the array's elements and the function
uses
expression assigned containing recursive call with literal argument in form of
string.
Call the function "Onload" event of the form as StatusBarBanner(10).
function StatusBarBanner(ok) {
// set pause in milliseconds between movement
var speed = 80
// assign one-space string to variable (space pads left side of status bar)
var str = " "
// create global array
var ar = new Array()
// assign the strings to the array's elements
ar[0] = "********Welcome to Our new Services*******"
ar[1] = "If you are creating a document for the first time. "
ar[2] = "Here are a few helpful tips to make completing this application a
little easier."
ar[3] = "1. Anytime you see a Bullet , it means that you must enter the
corresponding information in order to continue. It is required information."
// join all messages to one string variable with no delimiter
var total = ar.join("")
// if message has not yet reached the left side of the status bar
if (ok > 0) {
// assign string of ok spaces to variable
for (var i = 0; i < ok; ++i) {
str += " "
}
// append message to end of output string
str += total
// message moved one position to the left
ok--
// assign expression containing recursive call with literal argument in form
of string
var cmd = "StatusBarBanner(" + ok + ")"
// place computed message in status bar
window.status = str
// recursive call after speed milliseconds
timerID = setTimeout(cmd, speed)
} else
// if a substring of the total message still remains in status bar
if (-ok < total.length) {
// assign part of message that has not slided off the left
str += total.substring(-ok, total.length)
// message has moved one position to the left
ok--
// assign expression containing recursive call with literal argument in form
of string
var cmd = "StatusBarBanner(" + ok + ")"
// place computed message in status bar
window.status = str
// recursive call after speed milliseconds
timerID = setTimeout(cmd, speed)
} else {
// assign a one-space string to status bar
window.status = str
// recursive call after speed milliseconds at initial position
timerID = setTimeout("StatusBarBanner(100)", speed)
}
}



Download: IT Certifications 101
Inside this exclusive essential guide, our independent experts break down which IT certifications are worth your time and effort, and how to get started obtaining them to further your career— including specific certifications that any cloud or desktop pro should seriously consider.
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
You also agree that your personal information may be transferred and processed in the United States, and that you have read and agree to the Terms of Use and the Privacy Policy.
Start the conversation
0 comments