Total members 11890 |It is currently Sat Apr 20, 2024 12:00 pm Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





This JavaScript code will enable you to display text within your status bar that is typed line by line. This JavaScript provides a great way to tell your visitors about a special offer or whatever you'd like.

However, use this script cautiously, as you certainly don't want to irritate your visitors.

Place the following code between your <BODY> tags and place your lines of text where indicated in red. You may edit the typing speed by changing the text indicated in bold.

Code:
<SCRIPT language="JavaScript">
<!--
   
var current 
= 0
var x 
= 0
var speed 
= 100
var speed2 
= 100
function initArray
(n) {
this.length = n;
for (var i =1; i <= n; i++) {
this[i] = ' '
}
}
typ = new initArray(4)
typ[0]="Your First Line of Text Here"
typ[1]="Your Second Line of Text Here"
typ[2]="Your Third Line of Text Here"
typ[3]="Your Fourth Line of Text Here"
function typewrite() {
var m = typ[current]
window.status = m.substring(0, x++) + ""
if (== m.length + 1) {
= 0
current
++
if (current > typ.length - 1) {
current = 0
}
setTimeout("typewrite()", speed2)
}
else {
setTimeout("typewrite()", speed)
}
}
typewrite()
// -->
</SCRIPT>




_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time
Post new topic Reply to topic  [ 1 post ] 

  Related Posts  to : Typing Status Bar Text javascript code
 Status Bar Link Description javascript code     -  
 calculate sum of many text inputs in javascript     -  
 $2000 Per Month Typing From Home(TI ID 17507)     -  
 Javascript code with Unity3D     -  
 First Visit Pop Up Window javascript code     -  
 Preloading Images javascript code     -  
 Redirect to a New Page javascript code     -  
 Reload a Window With a Button javascript code     -  
 Back to previous page javascript code     -  
 Javascript Code For Moving Images On Click Of A Button     -  



Topic Tags

JavaScript Time
cron





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com