|
The first difference is the fact that you may want to take the calling function out of the onLoad and place it after the function and form embedded in <script language = "JavaScript"> and </script>. The reason you probably wouldn't want to do that with the scrolling text along the status bar is because it is distracting for the loading text to interact with the scroll. You can even take the script and use it in a MouseOver so it's activated when the user puts his/her mouse cursor over a link. The second difference is that this script doesn't require an onUnload because the window.defaultStatus never changes in this script. The third difference is that there has to be only 35 for this ticker tape to work well since the form box is size 35. The last difference is that this script doesn't use window.defaultStatus = scrolling_text, it uses document.scroller.scroll_text.value = scrolling_text which makes the scrolling text appear in the form box instead of the status bar. The document.scroller tells the computer that it should read off of the form, scroller. The scroll_text is the name of the form data item to be read off of, Value is the text that should appear in the box, and scrolling_text is the variable the new value is equal to. When you put it all together, you assign scrolling_text to appear in the form named scroller's form's input box named name.
AdditionsThe form with the form data is the addition. The <form name = "scroller"> tag creates a form named scroller. The <input name = "scroll_text" size = "35"> creates an input box which is called scroll_text and has a size of 35. The </form> ends the form data.
JCL's HTML & JavaScript Tutorial