Rigging the imagemap to trigger the pop-ups.
January 19, 1999
Rigging the imagemap to trigger the pop-ups.
<img src = "/images/newsite6.gif"
usemap = "#sitemap"
border = 0
alt = ""
width = 113
height = 211>
<map name = "sitemap">
<area shape = "rect"
coords = "9,2,66,15" href="http://www.insure.com/life/annuity/"
alt = ""
onMouseOver = "if(popAble)
{popIndex('annuities',event.screenX,event.screenY)};" >
...etc...
</map>
|
It was noted earlier,
much earlier,
that the client's table of contents was a GIF image
tied to an imagemap. The above code illustrates how
this imagemap HTML ties into the mission control script --
a vital relationship. As seen, when the user passes the
mouse over the "Annuities" map the onMouseOver
event handler triggers mission control -- if, and only if,
popAble allows it. Browsers which don't meet
the popAble criteria simply won't pop up a menu,
leaving them to behave in the spirit of the original un enhanced
page.
The Money Shot
...and it works!
The lessons here are universal -- developing anything,
from a reuben sandwich to a skyscraper will likely require
compromises and web development is no exception. In fact,
web development at this stage of the game requires quite
a bit of compromise because the development environment
is still immature, embattled, and to an unfortunate extent,
inconsistent. Constructing the perfect computer program is
impossible, of course, and that cannot be the goal of
a successful web development project; rather, a project
which is based on strong design principles, clean coding,
and is functional to the extent that it needs to be is perhaps
the best we can do at this point in time.
That both the developer and client share this understanding
is the vital grease in the wheel; fortunately, the
project exposed in this article enjoyed this frictionless
relationship, and so here it has been laid bare for all
to see.
Create and Destroy
DHTML Pop-Up Menus: A Parable of Triumph and Loss (Based on a True Story)
Authoring/DHTML/Menus/Resources.ht
|