HTML and CSS Reference
In-Depth Information
Some might find meddling with the status bar annoying. In fact, JavaScript could be
enabled, but the ability to change the status bar might have been disabled. For Firefox,
take the following steps to enable or disable the window's features (see Figure 10.20):
1. Click Tools
2. When the Options dialog box appears, click Content.
3. Check Enable JavaScript if it is not already checked, and then click Advanced.
4. The Advanced JavaScript Settings dialog box appears. From here, you can
enable or disable features as desired.
5. When done, click OK in the dialog boxes to close them.
Figure 10.20 Enable/Disable window and status bar options with Firefox.
In the next example, a timer is used to create a scrolling message in both the title and
status bars of the window. This is done by calling a function every .3 seconds that will
use JavaScript's substring function to change the value in a string of text. Removing the
first character of a string and then appending that value to the end of the same string,
all done repeatedly in rapid succession, gives the appearance of the text in motion. This
example will be expanded in Chapter 15 to put the scrolling message in a <div> con-
tainer within the document.
Search WWH ::

Custom Search