»
EnglishFrenchVietnamese

Print - Powerful DHTML-ticker - JavaScriptBank.com

Full version: jsB@nk » Scrollers » Powerful DHTML-ticker
URL: https://www.javascriptbank.com/powerful-dhtml-ticker.html

Powerful DHTML-ticker © JavaScriptBank.comThis powerful DHTML-ticker with fancy last-letter-animation runs without absolute positioning. What does this mean? It means that you may put the script anywhere into your webpage (for instance into tablecells as shown in this sample). Big advantage: the scroller fits seamlessly into your webpage design! Add as many messages as you like.Each message can be linked to a different URL. And each messsage can be set to a font, fontcolor and fontsize of its own. Use our new setup-wizard to install and configure the ticker in less than 5 minutes. Absolutely no programming skills required. Crossbrowser (not NN6).

Full version: jsB@nk » Scrollers » Powerful DHTML-ticker
URL: https://www.javascriptbank.com/powerful-dhtml-ticker.html



HTML
<TABLE border=0 cellPadding=2 width=700><TD bgColor=#ffeeee vAlign=center><SCRIPT>// PowerTicker with smart setup-wizard// Configure your messages. You may add as many messages as you like.var i_mes=0var message=new Array()var messagelink=new Array()var linktarget=new Array()var fnt=new Array()var fntsize=new Array()var fntcolor=new Array()var fntcolorlastletter=new Array()message[i_mes]="This DHTML-ticker with cool last-letter-animation requires no absolute positioning. What does this mean?"messagelink[i_mes]="http://www.google.com"linktarget[i_mes]="_blank"fnt[i_mes]="Verdana"fntsize[i_mes]="10"fntcolor[i_mes]="FF0000"fntcolorlastletter[i_mes]="880000"i_mes++message[i_mes]="This means you may put the script into ordinary tablecells as shown in this sample."messagelink[i_mes]="http://www.yahoo.com"linktarget[i_mes]="_blank"fnt[i_mes]="Comic sans MS"fntsize[i_mes]="12"fntcolor[i_mes]="0000FF"fntcolorlastletter[i_mes]="000088"i_mes++message[i_mes]="Each message can be linked to a different URL. Easy configuration of messages, tickersize, font, fontcolor, fontfamily, fontsize, and more. So get it now for free!"messagelink[i_mes]="http://www.altavista.com"linktarget[i_mes]="_top"fnt[i_mes]="Times"fntsize[i_mes]="10"fntcolor[i_mes]="00AA00"fntcolorlastletter[i_mes]="006600"i_mes++// standstill between the messages (microseconds)var standstill=2000// width of the tickervar tickerwidth=300// height of the tickervar tickerheight=80var speed=20var i_substring=0var i_presubstring=0var i_message=0var messagecontent=""var messagebackground=""var messagepresubstring=""var messageaftersubstring=""function initiateticker() {if (document.all) {showticker()}if (document.layers) {showticker()}}function getmessagecontent() {messagepresubstring=message[i_message].substring(0,i_presubstring)messageaftersubstring=message[i_message].substring(i_presubstring,i_substring)messagecontent="<table border=0 cellpadding=0 width="+tickerwidth+" height="+tickerheight+"><tr valign=top><td>"messagecontent+="<span style='position:relative; font-family:"+fnt[i_message]+";color:"+fntcolor[i_message]+";font-size:"+fntsize[i_message]+"pt;'>"messagecontent+="<a href='"+messagelink[i_message]+"' target='"+linktarget[i_message]+"'>"messagecontent+="<font color='"+fntcolor[i_message]+"'>"messagecontent+=messagepresubstringmessagecontent+="</font>"messagecontent+="</a>"messagecontent+="</span>"messagecontent+="<span style='position:relative; font-family:"+fnt[i_message]+";color:"+fntcolorlastletter[i_message]+";font-size:"+fntsize[i_message]+"pt'>"messagecontent+="<a href='"+messagelink[i_message]+"' target='"+linktarget[i_message]+"'>"messagecontent+="<font color='"+fntcolorlastletter[i_message]+"'>"messagecontent+=messageaftersubstringmessagecontent+="</font>"messagecontent+="</a>"messagecontent+="</span>"messagecontent+="</td></tr></table>"}function showticker() {if (i_substring<=message[i_message].length-1) {i_substring++i_presubstring=i_substring-1if (i_presubstring<0) {i_presubstring00}getmessagecontent()if (document.all) {ticker.innerHTML=messagecontentvar timer=setTimeout("showticker()", speed)}if (document.layers) {document.tickerroof.document.ticker.document.write(messagecontent)document.tickerroof.document.ticker.document.close()var timer=setTimeout("showticker()", speed)}}else {clearTimeout(timer)var timer=setTimeout("changemessage()", standstill)}}function changemessage() {i_substring=0i_presubstring=0i_message++if (i_message>message.length-1) {i_message=0}showticker()}if (document.all) {document.write('<span ID="tickerroof" style="position:relative;width:'+tickerwidth+'px;height:'+tickerheight+'px;">')document.write('<span ID="ticker" style="position:absolute;top:0px;left0px"></span>')document.write('</span>')}if (document.layers) {document.write('<ilayer name="tickerroof" height="'+tickerheight+'" width="'+tickerwidth+'">')document.write('<layer name="ticker" top=0 left=0"></layer>')document.write('</ilayer>')document.close()}window.onload=initiatetickerwindow.onresize=initiateticker</SCRIPT></td></table><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->