Metachecker.net
|
FontsMadeEasy.com
|
RankChecker.net
Learn Java Script Today
|
Over 5000 Free Fonts
|
Tutorials
|
Javascript Forum
|
Other Javascript Resources
|
Cheat Sheet
JavaScript Basics
Inserting Javascript
Complete Tutorial
Advance DHTML Tutorial
Script archive
Advanced Tutorials
Alert Scripts
Animation
Audio
Background Effects
Banner Ads
Browser Window
Buttons
Button Forms
Calculcators
Calendars
Clocks & Dates
Cookies
Cursor Effects
DHMTL Games
DHTML Miscellaneous
Equivalents
Forms
Games
IE4+ Scripts
IE5+ Scripts
Image Effects
Image Miscellaneous
Links & Buttons
Math Related
Messages Miscellaneous
Miscellaneous
Mouse Tricks
Navigation
Page Details
Password Protection
Pulldown Menus
Random Stuff
Scrolling
Status Bar
Text Animation
User Detail
User Info
Window Control
Editor
This is a very cool way to show you a little bit better how Javascript works. Go ahead. You can manipulate several different variables and then see the effects on the scroll box. Have fun!
Edit box
Message:
Speed:
Change:
Insert into <HEAD>
<SCRIPT LANGUAGE="JavaScript"> <!-- Begin var id,pause=0,position=0; function banner() { var i,k,msg=document.form1.message.value; k=(66/msg.length)+1; for(i=0;i<=k;i++) msg+=" "+msg; document.form2.banner.value=msg.substring(position,position+50); if(position++==document.form1.message.value.length) position=0; id=setTimeout("banner()",1000/document.form1.speed.value); } function action() { if(!pause) { clearTimeout(id); pause=1; } else { banner(); pause=0; } } // End --> </SCRIPT>
Insert into <BODY>
<BODY onLoad="banner()"> <!-- STEP THREE: Put this code into the BODY of your HTML document --> <CENTER> <FORM name="form1"> <TABLE border="3"> <caption>Edit box</caption> <tr><td align="right">Message:</td> <td><input type="text" name="message" value="This is a scroll - a text box scroll. " size="50"></td></tr> <tr><td align="right">Speed:</td> <td><input type="text" name="speed" value="10" size="5"></td></tr> <tr><td align="right">Change:</td> <td><center><input type="button" value=" Click here to make changes take effect" onclick="clearTimeout(id);position=0;banner()"></center></td></tr> </TABLE> </FORM> <p> <hr size="4" width="40%"> <p> <FORM name="form2"> <input type="text" name="banner" size="50"><br> <input type="hidden" value=" Start Banner " onclick="action()"> </FORM> </CENTER>
Other Options