<html>
<!-- Text in status bar SAMPLE - 3 -->
<!-- Start of Typing Text Script -->
<!-- one letter at a time in the Status bar -->
<!-- Instructions: Just put this script anywhere on your webpage and you will have the typewriter effect on your messages displayed in the tatus bar.
To change the speed of your banner increase or decrease the value for 'var speed'.
(P.S.: decreasing this value increases the speed of your banner.)
To change the pause between each message change the value for 'var pause'. (Note: increase value to increase pause.)
-->
<!-- Script supplied with CoffeeCup HTML Editor -->
<script language="javascript" type="text/javascript">
var speed = 130
var pause = 1003
var timerID = null
var texttype = false
var ar = new Array()
ar[0] = "I love Javascript message 1"
ar[1] = "I love my india message 2!"
ar[2] = "I love HTML message 1"
var msgnow = 0
var offset = 0
function stopBanner() {
if (texttype)
clearTimeout(timerID)
texttype = false
}
function startBanner() {
stopBanner()
showBanner()
}
function showBanner() {
var text = ar[msgnow]
if (offset < text.length) {
if (text.charAt(offset) == " ")
offset++
var partialMessage = text.substring(0, offset + 1)
window.status = partialMessage
offset++
timerID = setTimeout("showBanner()", speed)
texttype = true
} else {
offset = 0
msgnow++
if (msgnow == ar.length)
msgnow = 0
timerID = setTimeout("showBanner()", pause)
texttype = true
}
}
</SCRIPT>
</HEAD>
<BODY onLoad="startBanner()">
</BODY>
</HTML>
<!-- END OF SCRIPT -->
<!/SCRIPT>
</html>
No comments:
Post a Comment