Chapter 6 Menus Navigation and Web Page Protection
Chapter 6 Menus Navigation and Web Page Protection
</body>
</html>
Changing the Message Using Rollovers:
• You can make the status bar message alive by using
rollover.
• The message on the status bar changes as the visitor
moves the mouse cursor over objects on the page.
Moving the Message Along the Status Bar:
• A message displayed on status bar can be moved
along with the message.
Banner:
• The banner advertisement is the hallmark of every
commercial web page.
• It is typically positioned near the top of the web page, and
its purpose is to get the visitor's attention .
• Nearly all banner advertisements are in a file format such
as a GIF, JPG, TIFF, or other common graphic file formats.
• Some are animated GIFs, which is a series of images
contained in one file that rotate automatically on the
screen.
• Some are Flash movies that require the visitor to have a
browser that includes a Flash plug-in.
• Many banner advertisements consist of a single graphical
image that does not contain any animation and does not
require any special plug-in.
Banner Cont.:
• You need to do three things to incorporate a banner
advertisement in your web page:
1. Create several banner advertisements using a
graphics tool such as PhotoShop. You'll want to make
more than one advertisement so you can rotate them
on your web page using a JavaScript.
2. Create an <img> element in your web page with the
height and width necessary to display the banner
advertisement.
3. Build a JavaScript that loads and displays the banner
advertisements in conjunction with the <img>
element.
Loading and Displaying Banner Advertisements:
• The banners should all be the same size so they look
professional as they rotate on your web page.
• create an image element on your web page using the
<img> tag. You'll need to set four attributes of the <img>
tag: src, width, height, and name
• Set the src attribute to the file name of the first banner
advertisement that you want to display. Set the width and
height attributes to the width and height of the banner.
• Set the name attribute to a unique name for the image
element.
• The image element (banner) should be centered in the
page using the <center> tag within the <body> tag of
your web page.
Loading and Displaying Banner Advertisements Cont.:
• The final step is to build the JavaScript that will
rotate the banners on your web page. You'll define the
JavaScript in the <head> tag of the web page. The
JavaScript must do the following:
1. Load banner advertisements into an array.
2. Determine whether the browser supports the image
object.
3. Display a banner advertisement.
4.Pause before displaying the next banner
advertisement.
Loading and Displaying Banner Advertisements Cont.:
• The final step is to build the JavaScript that will
rotate the banners on your web page. You'll define the
JavaScript in the <head> tag of the web page. The
JavaScript must do the following:
1. Load banner advertisements into an array.
2. Determine whether the browser supports the image
object.
3. Display a banner advertisement.
4.Pause before displaying the next banner
advertisement.
Menus:
• The menu represents a group of commands that user
can perform to activate.
• It may contain multiple choices to select.
• User can choose one or more menu at a time
depending on type of menu.
Creating a Pull-Down Menu :
• A common problem is how to make it easy for
visitors to navigate a complex web site.
• The solution to this problem is to group web pages
into a pull-down menu.
• The menu can reflect a common theme among web
pages, and each menu option can identify a web page.
• You can use JavaScript to load the selected page.
Dynamically Changing a Menu :
• We can make options listed on a menu context-
sensitive that is, the set of options dynamically
change based on choices the visitor makes on the
page.
• In this way, one menu can be used to display different
sets of options, reducing the need to show too many
menus on a web page.
Validating Menu Selections :
• While filling the form user can forget to select an
option in menu.
• In such a case the incomplete information should not
be sent to the server.
• To make fields compulsory fill we use validations.
Floating Menu:
• The menu which is fixed while scrolling the webpage
is called as floating menu.
• It can be created by setting style position of menu as
fixed.
Chain Select Menu:
• A chain of pull-down menus can be created in which the
option selected from the first pull-down menu determines
the options that are available in the second pull-down
menu.
• Likewise, the second pull-down menu selection
determines options that are shown in the third pull-down
menu.
• So a chain of pull-down menus can be created.
Tab Menu:
• Tab menus display a one- or two-word description of
the menu option within a tab.
• A more complete description is displayed below the
tab bar as the visitor moves the mouse cursor over the
tab
Popup Menu:
• A popup menu displays several top-level menu items.
• A popup menu appears as the visitor moves the
mouse cursor over a top-level menu item.
• The popup menu contains lower-level menu items
that are associated with the top-level menu item
Highlighted Menu:
• A highlighted menu, causes two kinds of highlights to
appear around an item on the menu.
• When the visitor moves the cursor over a menu item, the
browser displays a box around the item with a shadow at
the bottom of the box.
• If the visitor selects the item, the highlight shadow
appears at the top of the box rather than at the bottom of
the box.
Folding Tree Menu:
• The folding tree menu should look familiar, because it
is a classic menu used in desktop applications to help
you to navigate file folders.
• The tree consists of one or more closed folders, each
of which appears alongside the folder's name.
• The tree expands when the visitor clicks a closed
folder, showing one or more menu options that are
associated with the folder.
• You can link each of these options to another web
page or to a bookmark within the web page that
contains the tree menu.
• The tree collapses when the visitor clicks an open
folder.
Folding Tree Menu Fig.:
Context Menu :
• The context menu pops up on the web page when the
visitor clicks the right mouse button .
• The location of the context menu on the screen is
determined by the position of the mouse cursor.
• The mouse cursor sets the position of the upper-left
corner of the context menu.
• Each menu item is automatically highlighted as the
visitor scrolls through the menu by moving the mouse
cursor.
• The visitor clicks the name of the item to select that
menu option.
• The context menu is hidden from the screen by clicking
the mouse cursor away from the menu.
Context Menu Fig.: