<p align="center"> <font color="red"> Warning: WebTV JavaScript Bug – Please Reload (Cmd-R)! Attn: PC Users Must Have Frames Enabled To View This Webpage! </font> </p>

PageBuilder Blinking Status Bars

Purpose of This Webpage

     This webpage is a demo of scripts to show a blinking status bar message in a WebTV PageBuilder webpage in response to queries in the PageBuilder NG's.

     Rather than trying to C&P an online free status bar "scroller" script and attempting to modify the script to cause status bar blinking text, I wanted to write a unique script that I hadn't seen before, and I wanted the script to be brief and simple.

     Here I have several scripts that use other javascript properties and methods that you see in hundeds of similar scripts available online; but, first here I have a unique simple loop script using "nested" setTimout function statements instead of the commonly used loops, conditional constructs, and counter increments. This script "blink" function uses successive nested setTimeout statements, with total accumulated time added to each successive nested setTimeout statement, with the last setTimeout looping back to the beginning statement. The message blinking speed can be changed in all these scripts by changing the setTimeout delay value in milliseconds – increase the "setTimeout" timers millisecond delay values to slow the blinking rate, decrease the delay to speed-up the blinking rate.

     The loop is stopped by setting ID variables to the setTimeout(s) for use in a clearTimeout method that can be scripted and called as a nested function within the blink function, or called by an event handler as I do in the first script below. To immediately stop the loop, I listed each timer ID in successive "clearTimeout(s)" as the "onClick" event handler attribute values in the stop links. The "stop" link also resets the status bar text to the webpage title. If I didn't clear both the status bar "blanking" setTimeout and the "looping" setTimeout, viewers would sometimes have to "double-click" the "stop" link to restore the webpage title to the status bar because the script would sometimes stop with the "blank" status bar.

     One other method I used in my scripts is "blanking" the status bar between each message iteration, instead of blinking each message in succession. This momentary "blanking" of the status bar before and after each message makes each message stand out as a distinctive, separate empahsized message, rather than appearing to be one long series of messages.

     To best view each example, I suggest that you start and stop each message separately. However, where necessary I use a "clearAll()" function that I use to clear all timers and restore the webpage title to the status bar with an "onMouseover" event handler in each individual script start link so that if you fail to stop each blinking message before starting another blinking message, the two messages will not blink concurrently and spoil the effect of viewing each message individually. I suggest when you use timers in your scripts, you always assign ID variables to all timers and provide scripts to clear all your timers – both individually or collectively as I have done here.

     The script loop functions can be called; ie, started and stopped; by "javascript:void()" or "javascript: protocol" links, and by any display element "event handler," such as: form text boxes "onFocus" and "onBlur," and link "onMouseover" and onMouseout" event handlers to blink status messages.

     Also note that in several of the blinking status bar message scripts below, I did not assign the status bar messages to variables; but, instead put the messages inside the statements for script brevity. As all scripters know, I could have assigned the messages to variables, and set the window.status values to the assigned variables in the function statements. Many scripters prefer to always assign and list variables at the beginning of their scripts – it's just a matter of personal preference for each script.

     Pages 1 and 4 of this website are PageBuilder Advanced Editor documents with an "extended" <head> tag that I recommended using in my Advanced Editor webpage. I put my "welcomeMsg()" function scripts that you see when these pages are loaded (reload to see it again), in an "extended" head tag so the script would be loaded before I "called" the welcome messages in the body tag "onLoad" event handlers. I put all of the scripts in the successive pages of this docment in a text box following the "new" body tag at the top of each page so you can see and print all the scripts in one place when you view the source code of this webpage with the Thunderstone© source code viewer at the bottom of this webpage. It wasn't necessary, but I put each individual script between <script> ... </script> tags so you could see each script separately.

Using JavaScript in PageBuilder

     Please note that I DID NOT USE ANY "ADDED" <HTML> TAGS preceeding my scripts! It is not necessary, yet many PageBuilders suggest you do so. This practice, using added <HTML> tags, has come into widespread use among WebTV PageBuilders because of the use of C&P'd free online scripts that contain "Returns" for "whitespace" that allow scripts to be easily read by authors and users. When you use scripts with "Returns" in a PageBuilder text box, you add these spaces in your document – which also occurs if you use "Returns" to space out HTML code, such as long table codes that you would like to space out for clarity. When PageBuilders do add an extra <HTML> tag before scripts in a text box, it works because our PageBuilder software program just considers that to be a separate Basic Editor document that is added into the PageBuilder basic webpage table "template" on the webpage servers. But, this added illegal <HTML> tag, which works with PageBuilder websites on our WebTV browsers, will not work on computer browsers! Write your scripts as I have here – USE SINGLE SPACES WHERE REQUIRED BETWEEN YOUR FUNCTION VARIABLES AND STATEMENTS, AND ALLOW YOUR TEXT BOX SCRIPTS TO AUTO-WRAP – NO "RETURNS" OR EXTRA SPACES IN YOUR PAGEBUILDER "SCRIPT" TEXT BOXES! If you C&P scripts, just remove all extra spaces so you will not have to add the extra <HTML> tag to make the script work!

     Also, another problem with WebTV PageBuilder webpage scripting is the fact that there seems to be a misunderstanding about the difference between the PageBuilder <head> tag and the PageBuilder "Add a heading" text boxes. PageBuilder headings are not the same as the built-in HTML <head> tag. PageBuilder "headings" are <h2>....</h2> tags for a level 2 heading that uses size "6" bold font, and which are placed in the <body> of the document. The HTML <head> tag is a document head block; immediately following the opening <html> tag, and preceeding the document <body> or <frameset> tag, which defines information about the document and includes the following HTML information tags: <meta>, <title>, <base>, <link>, <script>, and <style>. If you want to load scripts with the "onLoad" event handler in the body tag, you must have these scripts defined in the head tag of the document, before the body tag content loads. Use the PageBuilder Advanced Editor procedure to block the built-in head tag, so you can extend the head tag to an "Add text" box for all your scripts that must be loaded before being "called" in the body of the document.

     My blinking status bar scripts begin on the next page. Use the source code viewer at the bottom of each page to see the scripts. Work with the scripts; change, experiment with, and use these scripts anyway you like. The same basic functions can be scripted many different ways – most scripters have their own unique preferences for script structure. These scripts will help you understand loops and timer scripts. It takes lots of practice scripting to become proficient at JavaScript, and WebTV "JellyScript" is a real challenge to use in PageBuilder webpages.

     These blinking status bar messages can be an enhancement to your webpages if used in good taste. Blinking and scrolling status bar messages must be used sparingly – most webpage visitors have a low tolerance for these distracting messages. Many webpage authors mistakenly try to impress their webpage visitors with their scripting abilities by adding distracting, irritating "gimmickry!" Always use attention grabbing effects sparingly!

     On Page 5, I outline a WebTV browser specific problem with webpage title "flashover" using blinking status bar messages, and status bar "scollers" scripts that pause and change direction, that you should be aware of before using these scripts. I explain this problem and request solutions from anyone who help. I also question whether our WebTV browsers have a limited number of timers that can be tracked at any one time, because of problems I had with multiple timer webpages.


View the of this webpage with the Thunderstone Source Code Viewer


Powered by MSN TV
next page