Home arrow JavaScript arrow Page 4 - Controlling Browser Properties with JavaScript

Bar Tales - JavaScript

Maybe you know how to make Web pages dance to your tune with JavaScript - but how about making the browser do the same? This tutorial focuses on the important browser objects (including the Window, Location and History objects) that are controllable via JavaScript, showing you how to manipulate and use them in your scripts.

  1. Controlling Browser Properties with JavaScript
  2. Starting at the Top
  3. Moving Windows
  4. Bar Tales
  5. Navigating the Family Tree
  6. Location is Everything
  7. History Lesson
  8. Down to the Document
By: Nariman K, (c) Melonfire
Rating: starstarstarstarstar / 120
February 02, 2004

print this article



The status bar, located at the bottom of the browser window, has long been a territory abused by unimaginative developers. The default text that appears in this area may be altered via the Window object's "status" property, as in the following example:

<script language="JavaScript">
.status "The evil that men do in this bar lives after them"

A common use of the "status" property is to display a scrolling ticker-tape in the status bar. Here's how:

<script language="JavaScript">
// ticket-tape message
var message = "Yo ho ho and a bottle of rum";
// set delay
var delay = 75;
function tickerTape() 
.status message;
message.substring(1message.length) + message.substring(01);
.setTimeout ("tickerTape()"delay); 

<body onLoad="tickerTape()">

In this case, I've created the appearance of a moving tickertape by taking one character off the beginning of the message string and adding it to the end. Each time the tickerTape() function calls itself, the first character of the string is deleted and added to the end of the string, simulating a scrolling ticker-tape. The setTimeout() function performs this add-and-remove function once every 75 milliseconds. Finally, the "status" property is used to assign the result at each stage to the browser's status bar.

>>> More JavaScript Articles          >>> More By Nariman K, (c) Melonfire

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Javascript for Beginners: An Introduction
- Introduction to JavaScript
- Adding Elements to a Tree with TreeView jQue...
- Using the Persist Argument in a TreeView jQu...
- Using Unique and Toggle in a TreeView jQuery...
- Using Event Delegation for Mouseover Events ...
- Using the Animate Option in a Treeview jQuer...
- Using HTML Lists with Event Delegation in Ja...
- Opened and Closed Branches on a TreeView jQu...
- Mouseover Events and Event Delegation in Jav...
- Creating a TreeView JQuery Hierarchical Navi...
- Event Delegation in JavaScript
- A Look at the New YUI Carousel Control
- Working with Draggable Elements and Transpar...
- Displaying Pinned Handles with Resizable Con...

Developer Shed Affiliates


Dev Shed Tutorial Topics: