spacer

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


home / experts / dhtml / column56
Developer News
iPhone Users Just Want to Have Fun
Oops! I Fixed the Linux Kernel
Jim Zemlin: The New Center of Linux Gravity
Logo

Hiermenus Go Forth, XX:
Version 4.0.13 - The Complete Script (Full-Window)



Creating a More Image Rollover

Click for Menu 

Click the link on the left to display a menu tree. Click off the tree anywhere on the page to hide.

Two new parameter variables have been introduced to create the rollover:

HM_GL/PG_ImageSrcOver   (paired with the existing HM_GL/PG_ImageSrc)
HM_GL/PG_ImageSrcLeftOver   (paired with the existing HM_GL/PG_ImageSrcLeft.)

They have no default value. The default behavior of the HM is to have no image rollover. If you want a rollover, you simply include the relevant parameter in HM_Loader.js (HM_GL_ImageSrcOver or HM_GL_ImageSrcLeftOver) or your page (HM_PG_ImageSrcOver or HM_PG_ImageSrcLeftOver) with an image filename as its value.

For example, let's say you wanted all your menus in all your pages to have an image rollover behavior, with a white image replacing a black image. Most of your menu trees are built in the default left-to-right, but some are right-to-left. You therefore have need of both right-pointing images and left-pointing images on your site.

To specify image rollover behavior for all menu trees site-wide, you can include these lines in HM_Loader.js:

HM_GL_ImageSrc = "HM_More_black_right.gif";
HM_GL_ImageSrcOver = "HM_More_white_right.gif";
HM_GL_ImageSrcLeft = "HM_More_black_left.gif";
HM_GL_ImageSrcLeftOver = "HM_More_white_left.gif";

You have now specified site-wide behavior. Now let's assume you want to change this behavior for some of your pages. Here are a couple of scenarios:

There are many combinations, of course. Try to use the most efficient combination of global and page parameters. Use page parameters only if you are overriding global settings.



On the next page, the first of our two fixes.


Produced by Peter Belesis and



JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

webref The latest from WebReference.com Browse >
Advanced Web Performance Optimization · Simple Comments Meets OpenID · Primitive Data Types, Arrays, Loops, and Conditions: Part 3
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Five Key Factors Drive Mobile Device Growth · Lian-Li Launches New Power Supply Line, Rack Mount Kit and Fan Blower · OpenOffice.org Tips and Tricks Part III

All Rights Reserved. Legal Notices.
Created: July 12, 2001
Revised: July 12, 2001

URL: http://www.webreference.com/dhtml/column56/3.html