Total members 10262 | Gratitudes |It is currently Thu May 24, 2012 10:06 am Login / Join Codemiles


All times are UTC [ DST ]




Post new topic Reply to topic  Quick reply  [ 1 post ] 
Author Question
 Question subject: Typing Status Bar Text javascript code
PostPosted: Mon Oct 20, 2008 12:00 am 
Offline
Mastermind
User avatar

Joined: Tue Mar 27, 2007 10:55 pm
Posts: 2279
Location: Earth
Has thanked: 39 time
Have thanks: 61 time

Looking for a way to enhance your web site? 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">
<!-- Script courtesy of http://www.web-source.net - Your Guide to Professional Web Site Design and Development
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 (x == m.length + 1) {
x = 0
current++
if (current > typ.length - 1) {
current = 0
}
setTimeout("typewrite()", speed2)
}
else {
setTimeout("typewrite()", speed)
}
}
typewrite()
// -->
</SCRIPT>

_________________
Currenlty programming with : java , html , php , and javascript . (OCJP-6 certified )


TOP
 Profile Send private message  
Reply with quote  
Post new topic Reply to topic Quick reply  [ 1 post ] 
Quick reply


  

 Similar topics
 Read your gmail using Java code
 Search records from text file
 Code to open multiple links.
 I need help with checkers code
 java code for listing folder contents from remote folder
 code for online payment system in java
 JavaScript fade out problem
 apriori algorithm java code
 playfair cipher assembly code
 code

All times are UTC [ DST ]


Users browsing similar posts

Users browsing this forum: No registered users and 2 guests



Jump to:  
Previous Question | Next Question 




Home
General Talks
Finished Projects
Code Library
Games
Tutorials

Java
C/C++
C-sharp
php
Script
JSP/Servlets
Ajax
ASP/ASP.net
Google SEO
Database
Communications
Phpbb3 styles
Photoshop tutorials
Flash tutorials
Find a job






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team