Scrolling message on the status bar using Javascript

By: Guru Singh Emailed: 1642 times Printed: 2112 times    

Latest comments
By: rohit kumar - how this program is work
By: Kirti - Hi..thx for the hadoop in
By: Spijker - I have altered the code a
By: ali mohammed - why we use the java in ne
By: ali mohammed - why we use the java in ne
By: mizhelle - when I exported the data
By: raul - no output as well, i'm ge
By: Rajesh - thanx very much...
By: Suindu De - Suppose we are executing

If you are looking for a simple java script to show a scrolling message on the status bar then you can use this script.

<!-- TWO STEPS TO INSTALL WRITE AND SLIDE:

1. Paste the coding into the HEAD of your HTML document
2. Copy the onLoad event handler into the BODY tag -->

<!-- STEP ONE: Copy this code into the HEAD of your 
HTML document -->

<HEAD>

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
var Message="Yet another simple scroll!";
var place=1;
function scrollIn() {
window.status=Message.substring(0, place);
if (place >= Message.length) {
place=1;
window.setTimeout("scrollOut()",300); 
} else {
place++;
window.setTimeout("scrollIn()",50); 

}
function scrollOut() {
window.status=Message.substring(place, Message.length);
if (place >= Message.length) {
place=1;
window.setTimeout("scrollIn()", 100);
} else {
place++;
window.setTimeout("scrollOut()", 50);
}
}
// End -->
</SCRIPT>

<!-- STEP TWO: Add this onLoad event handler 
into the BODY tag -->

<BODY onLoad="scrollIn()">

<p><center>
<font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
by <a href="http://www.java-samples.com">The Java samples home</a></font>
</center><p>

 


Javascript Home | All Javascript Tutorials | Latest Javascript Tutorials

Sponsored Links

If this tutorial doesn't answer your question, or you have a specific question, just ask an expert here. Post your question to get a direct answer.



Bookmark and Share

Comments(0)


Be the first one to add a comment

Your name (required):


Your email(required, will not be shown to the public):


Your sites URL (optional):


Your comments:



More Tutorials by Guru Singh
Scrolling message on the status bar using Javascript
Diabling Right Click option in a browser using Javascript
Password protect a web page using Javascript
Using revealTrans to do page transitions in Javascript
Question: How is the MVC design pattern used in Struts framework?
Question: What is the directory structure of a web application?
Question: Explain the life-cycle methods in JSP?
Question: What is an output comment in JSP?
Question: What is a Hidden Comment in JSP?
Question: What is an Expression tag in JSP?
Question: Difference between forward and sendRedirect in JSP?

More Tutorials in Javascript
Use WinSCP to transfer log files remotely using Javascript
Verifying user input in JavaScript
Pause execution in JavaScript
Javascript to display client date and time on webpage
Getting Browser's height and width using Javascript
Highlighting text on a page using CSS
Using revealTrans to do page transitions in Javascript
Password protect a web page using Javascript
Diabling Right Click option in a browser using Javascript
Scrolling message on the status bar using Javascript
window.frames[i] in Javascript
Form validation using Javascript
Using && in Javascript
The if statement in Javascript
do-while, while, for and for-in loops in Javascript

More Latest News
Most Viewed Articles (in Javascript )
Typecasting in Javascript
Using parseInt() and parseFloat() in JavaScript to convert data types to Numbers
Show how many characters remaining in a html text box using javascript
List of Keywords and reverved words in Javascript
Scrolling message on the status bar using Javascript
Getting Browser's height and width using Javascript
Javascript Basics
History and evolution of Javascript
switch in Javascript
call() and apply() methods in Javascript
Bitwise NOT, AND, OR, XOR operators in Javascript
The if statement in Javascript
do-while, while, for and for-in loops in Javascript
Pause execution in JavaScript
Using ! and !! in Javascript
Most Emailed Articles (in Javascript)
Diabling Right Click option in a browser using Javascript
Click to remove an element from a select html form using javascript
Bitwise NOT, AND, OR, XOR operators in Javascript
this keyword sample in Javascript
Getting Browser's height and width using Javascript
Show how many characters remaining in a html text box using javascript
History and evolution of Javascript
Using toString() in JavaScript to convert data types to String
Using parseInt() and parseFloat() in JavaScript to convert data types to Numbers
Using ! and !! in Javascript
Using && in Javascript
Highlighting text on a page using CSS
Using revealTrans to do page transitions in Javascript
Javascript to display client date and time on webpage
Verifying user input in JavaScript