spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / programming / javascript / diaries / 7

[previous] [next]

Sr Instructional Designer D2L-Moodle,Clearance
WSI Nationwide, Inc.
US-NJ-Fort Monmouth

Justtechjobs.com Post A Job | Post A Resume
Developer News
News Flash: Adobe Has iPhone Workaround
Adobe's Flash 10.1 Goes Mobile (Minus iPhone)
A Salute to Visionary CEOs


The JavaScript Diaries: Part 7

By 

defaultStatus

browser status bar

The status bar is located at the bottom of the browser. Usually, it displays the URL of a link on the Web page when the mouse hovers over it. The defaultStatus property sets a message to display in the status bar when nothing else is displayed, such as a welcome message or instructions to the visitor. It can be set when the page is initially loaded or when some other event happens. To set it when the page is loaded, you can use the following script in the <body> tag:

<body onLoad="window.defaultStatus='Welcome to my Web page!';">

Be aware, however, that many users prefer to see the URL in the status bar rather than a message.

frames

This property contains an array of all the frames in the current window. We'll look at this in more detail later when we learn about arrays.

name

This property contains the name of the window. The name of the window should not be confused with the title of the page, which is located within the <title></title> tags. The name is used by the browser to reference the window.

You can use the name property to retrieve the name of the current window or to assign a name to the window. It's useful when using frames and popup windows.

It's important to note that the main window in the browser does not have a name. Using the name property without first declaring a name for the window will return an empty string.

There are several techniques used in assigning a name to a window. One method would be to place the following script in the <head> section:

window.name="The Main Window";

Then, if you want to display the name of the window on the page, place this script in the <body> section:

document.write("The name of this window is " + window.name);

The process used here is pretty straightforward. Before the page loaded, we used the name property of the window object to assign a name to the current window. Then, once the page was loaded, we wrote the name of the window to the Web page.

opener

This property is used in popup windows to refer to the window that originally opened it. If the window was opened by the user, it will return a value of null as there is no valid window (not valid, meaning that it was not opened by a script). See also the closed property.

home / programming / javascript / diaries / 7

[previous] [next]

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Building a Banking Application Home Page with OOP · Mixing Scripting Languages · Review: phpFox, a Social Networking CMS with all the Bells and Whistles
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Enterprise 2.0: Social Networking in the Cloud · BroadSoft Marketplace Hastens Pace of Telephony Innovation · Review: HTC Hero for Sprint

Created: July 22, 2005

URL: