form input method and the status bar method
In this form two variables are being set up to run in the input box.
The next thing done was the naming of the function. The name can be anything you wish. You reference the script from your page using this name and the parenthesis.
The other item you can change in this script is the speed at which the scroll effect works. In this script it is set at 200. This is measured in thousandths of a second. In other words, the text will move one letter to the left five times a second. At 20 the text would move ten times faster. Adjust to your own taste.
var space = " "
var scr = space + "This text is scrolling in the form..."
temp = scr.substring(0,1);
scr += temp
scr = scr.substring(1,scr.length);
document.Scroll.ScrollBox.value = scr.substring(0,55);
var counts = setTimeout("ScrollingAlong()",200);
Place the script above in the head of the document.
Place this in the body tag. onLoad="ScrollingAlong()"
When the page loads it will fire the script.
And last, place the form below (without changes) in the body where you want the scroll message to appear.
<input type="text" size="25" name="ScrollBox" value=" ">
That's it! You are done.
In this example two variables are being set up to run in the status bar at the bottom of the window.
Space is set up as before. The second variable I called woids. You can name the variable almost anything you wish. Best to keep it unique. Place your message between the quotes as before. Adjust the speed of the scrolling effect.
Next, place the script in the head of the document.
Once again, place this in the body tag onLoad="ScrollingAgain()"
When the page loads it will fire this script.
You can put multiple calls in the body tag as I have done for this page
Both scripts fire when the page loads. Just use a comma to seperate the function names.
Hope that this helps you...
Author: Joseph Raymond
27th of March, 2001