JavaScript
  Home arrow JavaScript arrow Page 4 - Controlling Browser Properties with Ja...
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
IBM Developerworks
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVASCRIPT

Controlling Browser Properties with JavaScript
By: Nariman K, (c) Melonfire
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 103
    2004-02-02

    Table of Contents:
  • Controlling Browser Properties with JavaScript
  • Starting at the Top
  • Moving Windows
  • Bar Tales
  • Navigating the Family Tree
  • Location is Everything
  • History Lesson
  • Down to the Document

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    Iron Speed
     
    ADVERTISEMENT

    The Web Buyer's Guide is your best source for white papers on a wide range of IT products and services. This Week's Featured White Papers: Taming the Threat Landscape by Symantec

    Controlling Browser Properties with JavaScript - Bar Tales
    (Page 4 of 8 )

    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">
    window
    .status "The evil that men do in this bar lives after them"
    </script>


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


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

    </head>
    <body onLoad="tickerTape()">
     
    </body>
    </html>

    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


     

       

    JAVASCRIPT ARTICLES

    - Getting Attention with Interactive Effects
    - Interacting with Tooltips and Previews
    - Just-in-Time Information and Ajax
    - Interactive Effects
    - Using Cookies With JavaScript
    - Understanding the JavaScript RegExp Object
    - Controlling Browser Properties with JavaScri...
    - Using Timers in JavaScript
    - Form Validation with JavaScript
    - JavaScript Exception Handling
    - Stringing Things Along
    - Understanding The JavaScript Event Model (pa...
    - Understanding The JavaScript Event Model (pa...
    - An Object Lesson In JavaScript

    Iron Speed



    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway