[thelist] DHTML menus

Peter-Paul Koch gassinaumasis at hotmail.com
Thu Nov 1 12:32:40 CST 2001


>ok... tried it and it's nice... except...
>
>greatarrow.com/test.html
>
>trying to get that products menu (with a 50x50 offset from the upper
>left corner) to actually affix itself to the Products image in the black
>nav bar...
>
>any ideas?

You need to find out what the left of the image is and make this the left of 
the layer. I happen to write a similar script at the moment, so here is some 
code.

<A HREF='etc' onMouseOver='functionCall(this)'>

You need to send the object (the link) to the function.

Netscape 4: actually very simple

function functionCall(obj)
{
if (document.layers)
  theLeft = obj.x;
else if (document.getElementById)
  theLeft = obj.offsetLeft;

  rest of code, div.style.left = theLeft
}

This assumes that you don't use any layers except for the ones that become 
visible. I haven't found out how to do it in IE4 yet.

Top: obj.y and obj.offsetTop

ppk

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp





More information about the thelist mailing list