Krishna Rajendra Alapati

IT Professional having 4+ years of experience on Java and JEE technologies. Good experience in working with Servlets, JSP, EJB2, XML, XSLT and JEE Design patterns. Good experience in working with open source frameworks like Struts, Spring, Hibernate, ANT, JUnit and JMock.

My Photo
Name:
Location: London, Ilford, United Kingdom

Monday, November 28, 2005

Good Example for Text ticker

see the below good example for text ticker with some static data

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<SCRIPT language=javaScript>
// Courtesy of SimplytheBest.net - http://simplythebest.net/scripts/
<!-- Beginning of JavaScript -
var thissize=11
var textfont="Verdana"

var textcolor= new Array()
textcolor[0]="EEEEEE"
textcolor[1]="DDDDDD"
textcolor[2]="CCCCCC"
textcolor[3]="AAAAAA"
textcolor[4]="888888"
textcolor[5]="666666"
textcolor[6]="555555"
textcolor[7]="444444"
textcolor[8]="333333"
textcolor[9]="222222"
textcolor[10]="111111"
textcolor[11]="000000"

var message = new Array()
message[0]="<a href=http://simplythebest.net>SimplytheBest.net</a>"
message[1]="The 'MORE INFO CHANNEL'"
message[2]="Clean look and feel, easy to browse"
message[3]="NO POPUP WINDOWS"
message[4]="The user friendly information library"
message[5]="with the popular <a href=http://simplythebest.net/software/>Shareware & Freeware directory</a>"
message[6]="an <a href=http://simplythebest.net/affiliates/>Affiliate programs directory</a>"
message[7]="the <a href=http://simplythebest.net/scripts/>DHTML scripts and Javascripts library</a>!"
message[8]="the <a href=http://simplythebest.net/music/>Music directory</a> for artists and musicians"
message[9]="<a href=http://simplythebest.net/scripts/perl_scripts/>CGI scripts collection</a>"
message[10]="the new <a href=http://simplythebest.net/drivers/>Device Drivers</a> section"
message[11]="and more......"
message[12]="<img border=0 src=../images/smallhome.gif width=111 height=29>"

var i_blurstrength=10
var i_message=0
var i_textcolor=0

function blurtext() {
if(document.all) {
if (i_blurstrength >=-2) {
if (i_textcolor >=textcolor.length-1) {i_textcolor=textcolor.length-1}
blurthis.innerHTML="<span id='blurpit1' style='position:absolute;visibility:visible;width:600px;top:5px;left:5px;filter:blur(add=0,strength="+i_blurstrength+",direction=90);font-family:"+textfont+";font-size:"+thissize+"pt;color:"+textcolor[i_textcolor]+"'>"+message[i_message]+"</span>";
document.close()
i_blurstrength=i_blurstrength-2
i_textcolor++
var timer=setTimeout("blurtext()",60)
}
else {
if (i_textcolor >=textcolor.length-1) {i_textcolor=textcolor.length-1}
blurthis.innerHTML="<span id='blurit1' style='position:absolute;visibility:visible;width:600px; top:5px;left:5px;filter:blendTrans(duration=4.2);font-family:"+textfont+";font-size:"+thissize+"pt;color:000000'>"+message[i_message]+"</span>";
i_message++
if (i_message>=message.length){i_message=0}
i_blurstrength=20
i_textcolor=0
clearTimeout(timer)
var timer=setTimeout("blurtext()",2000)
}
}
}
// - End of JavaScript - -->
</SCRIPT>
</HEAD>

<BODY onLoad="blurtext()">
<DIV id="blurthis" style="position:absolute;visibility:visible;">
</DIV>
</BODY>
</HTML>

0 Comments:

Post a Comment

<< Home