0% found this document useful (0 votes)
13 views9 pages

Status Bar - L1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views9 pages

Status Bar - L1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

OUTLINE

Status bar
• Build a static message
• Changing the message using rollover
• Moving the message along the status bar
Banner
• Loading and displaying banner advertisement
• Linking a banner advertisement to URL
STATUS BAR
• The status bar is located at the bottom of the browser window and is
used to display a short message to visitors of your web page
• Some developers display a message when the web page first opens
• Other developers might change the message to reflect whatever the
visitor is doing on the web page
Building a static message
• We can build a static message which is displayed on the status bar when
the web page opens and remains on the status bar until web page is
closed
• The content of status bar is value of window object’s status property
• Static message can be built using following syntax
window.status = “Welcome to this website!!!!!”;
CHANGING THE MESSAGE USING ROLLOVER
• You can change the message on status bar as the visitor moves the
mouse cursor over the objects on the page
• You can use onmouseover and onmouseout events for changing the
status bar messages
• You can create java script function to change the status bar message as
the mouse rolls over different objects
MOVING THE MESSAGE ALONG THE STATUS
BAR
• You can give the status bar message a sense of movement
• For that, you can use setInterval ( ) method to call the function at fixed
interval say, 1000ms
• The function will display the message in status bar by adding spaces
before the original message
• Each time the number of spaces will be increased, which will give
moving effect to the message
BANNER
• The banner advertisement is a hallmark of every commercial web page
• It is typically positioned near the top of web page, and its purpose is to
get the visitor’s attention by doing all sorts of clever things
• Nearly all banner advertisements are in file format such as GIF, JPG,
PNG etc.
• You need to do following three things to incorporate a banner
advertisement in your web page
- Create an array of image file names
- Create an <img> element in your web page with the height and width
necessary to display the banner advertisement
- Build java script that loads and displays the banner in conjunction with
the <img> element
LINKING BANNER ADVERTISEMENT TO URLS
• A banner is designed to encourage the visitor to learn more information
about a product or service that is being advertised
• To get additional information, the visitor is expected to click the banner
so that a new web page opens
• You can link a banner advertisement to a web page by inserting a
hyperlink into your web page that calls a java script function rather than
URL of web page
• This java script function then determines the URL that is associated with
the current banner

You might also like