»
EnglishFrenchVietnamese

Print - News Bar script - JavaScriptBank.com

Full version: jsB@nk » Scrollers » News Bar script
URL: http://www.javascriptbank.com/news-bar-script.html

News Bar script © JavaScriptBank.comAn attractive 'news bar' script. Messages are automatically rotated and displayed, with the ability to manually cycle back and forth through them. This script is created entirely using form buttons.

Full version: jsB@nk » Scrollers » News Bar script
URL: http://www.javascriptbank.com/news-bar-script.html



CSS
<style><!--.scrollerstyle{font-family:webdings;background:#FFFFFF;border:1px solid #000000;cursor:hand;}--></style><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<script language="javascript">//News Bar script- By Premshree Pillai (premshree@hotmail.com)//http://www.qiksearch.com/javascripts.htm var msgs = new Array(     "Click here to go back to JavaScriptBank.com",     "JavaScriptBank.com - free scripts and tutorials",     "JavaScriptBank.com - Bank of over 2000+ free JavaScripts"); // No comma after last ticker msg var msg_url = new Array(     "http://JavaScriptBank.com",     "http://JavaScriptBank.com",     "http://JavaScriptBank.com"); // No comma after last ticker urlvar barwidth='350px' //Enter main bar width in px or %var setdelay=3000 //Enter delay between msgs, in mili-secondsvar mouseover_color='#E1FFE1' //Specify highlight colorvar mouseout_color='#FFFFFF' //Specify default color/////////////////////////////////////////////////////////////////////var count=0;var ns6=document.getElementById&&!document.allvar ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1if (ie4||ns6){document.write('<form name="news_bar"><input type="button" value="3" onclick="moveit(0)" class="scrollerstyle" style="width:22px; height:22px; border-right-width:0px;" name="prev" title="Previous News"><input type="button" name="news_bar_but" onclick="goURL();" style="color:#000000;background:#FFFFFF; width:'+barwidth+'; height:22px; border-width:1; border-color:#000000; cursor:hand" onmouseover="this.style.background=mouseover_color" onmouseout="this.style.background=mouseout_color"><input type="button" value="4" onclick="moveit(1)" class="scrollerstyle" style="width:22px; height:22px; border-left-width:0px;" name="next" title="Next News"></form>');}else{document.write('<form name="news_bar"><input type="button" value="Previous" onclick="moveit(0)">')if (navigator.userAgent.indexOf("Opera")!=-1)document.write('<input type="button" name="news_bar_but" onclick="goURL();" style="width:'+barwidth+'" border="0">')elsedocument.write('<input type="button" name="news_bar_but" onclick="goURL();" width="'+barwidth+'" border="0">')document.write('<input type="button" value="Next" onclick="moveit(1)"></form>')}function init_news_bar(){  document.news_bar.news_bar_but.value=msgs[count];}//moveit function by Dynamicdrive.comfunction moveit(how){if (how==1){ //cycle fowardif (count<msgs.length-1)count++elsecount=0}else{ //cycle backwardif (count==0)count=msgs.length-1elsecount--}document.news_bar.news_bar_but.value=msgs[count];}setInterval("moveit(1)",setdelay)function goURL(){ location.href=msg_url[count];}init_news_bar();</script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->