»
EnglishFrenchVietnamese

Print - Text Box Banner - JavaScriptBank.com

Full version: jsB@nk » Form » Textarea » Text Box Banner
URL: http://www.javascriptbank.com/text-box-banner.html

Text Box Banner © JavaScriptBank.comThe script display the scrolling messages in a text input.

Full version: jsB@nk » Form » Textarea » Text Box Banner
URL: http://www.javascriptbank.com/text-box-banner.html



JavaScript
<SCRIPT language=javascript><!--var bannerID=0  //create a global variable named bannerID.function banner(msg,ctrlwidth) {        // bring msg width to form control width.        msg = " --- "+msg        newmsg = msg        while (newmsg.length < ctrlwidth) {                newmsg += msg        }        // Set up the form and form field.        document.write ('<FORM NAME="Banner">');        document.write ('<CENTER><INPUT NAME="banner" VALUE= "'+newmsg+'" SIZE= '+ctrlwidth+'></CENTER>');        document.write ('</FORM>');        var bannerID = null        rollmsg()       //get the banner rolling}function rollmsg() {      NowMsg = document.Banner.banner.value        NowMsg = NowMsg.substring(1,NowMsg.length)+NowMsg.substring(0,1)        document.Banner.banner.value = NowMsg        bannerID = setTimeout("rollmsg()",150)}// --></SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<SCRIPT><!--msg = " Hello...                        How do you like the script?                       Keep watching...                       Okay, that's it.                           Go back now...                        NOW!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!                                  "ctrlwidth = "30"banner(msg,ctrlwidth);// --></SCRIPT><FORM><INPUT onclick=parent.window.close() type=button value=Close></FORM><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->