RE: dhtml menus

by anottingham(at)topazti.com (Amy Nottingham)

 Date:  Fri, 14 Jul 2000 09:01:29 -0500
 To:  "Dawn" <dawn(at)soholondon.com>,
"HWG techniques" <hwg-techniques(at)hwg.org>
 In-Reply-To:  soholondon
  todo: View Thread, Original
Hi Dawn,

I use a script on our site that is similar to the one on Microsoft's site as
well.  I actually found the script on a search I did for pop-up menus.  From
my experience, getting the menu to disappear when you are not mousing over
another menu is the hardest part.  The script I use, to oversimplify, uses
the document.captureEvents to capture an onmouseout, and then onmouseout
makes the menu disappear, for Netscape, and the window.event.cancelBubble =
true; for IE.  (The reason you have to use two different ways is because of
the differences in the DOM between IE and Netscape).

The major problem with this is that once the onmouseout is captured for this
function, since it is at the document level, onmouseout does not work
anywhere else on the page, because (I think) it has already been handled
document-wide.  (If anyone else on the list can tell me how to "uncapture"
an event I would really appreciate it.  I think the capturing has to be done
at the document level because the menus are each created by a different
div).  My javascript is not good enough to figure that one out yet! :)

If you would see the script in detail, our page is located at:
http://www.topaztracks.com/home/home.html  (warning: this is a commercial
site)

I am sorry I can't find the link to the original script I used, I am at work
and I think it is at home, but I will try to find it and e-mail it to you if
you are interested.

I hope this will at least give you some help...it is not a very complete
answer.  There are definitely zillions of methods for creating pop-up menus,
and if this doesn't help, try doing a search on pop-up menus, and then see
if you can find a script that comes close to what you are using.

Sincerely,

Amy Nottingham





> -----Original Message-----
> From: owner-hwg-techniques(at)hwg.org
> [mailto:owner-hwg-techniques(at)hwg.org]On Behalf Of Dawn
> Sent: Monday, July 10, 2000 9:30 AM
> To: hwg-techniques(at)mail.hwg.org
> Subject: dhtml menus
>
>
> Hi,
>
> I have a navigation bar that uses div tags to create menus that appear
> when you roll over a link.  Currently, the menu disappers when you roll
> over another link (and it shows another menu) or when you click on one
> of the links in the menu.
>
> My problem is that if a user decides not to click on a menu item and
> just rolls off, they are still left with that menu over the page.  I was
> wondering how the menu could be made to disappear on mouse out.  I have
> tried putting onMouseOut= and then setting hide within the div tag, but
> as soon as you roll over a link in that menu, it thinks that you have
> rolled off and so disappears!
>
> The menu's functionality is similar to the one used on microsoft's
> homepage, but my javascript is not good enough to work out what they are
> doing.
>
> Any help would be very much appreciated.
>
> Yours,
> Dawn
>

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA