Re: Layer visibility & JavaScript
by "Bryan Bateman" <batemanb(at)home.com>
|
Date: |
Tue, 5 Dec 2000 23:14:10 -0000 |
To: |
<hwg-techniques(at)hwg.org>, "Peggi & Ben Rodgers" <woodduck(at)mbay.net> |
References: |
mbay |
|
todo: View
Thread,
Original
|
|
Dynamic Positioning:
------Netscape4-----------------
Layers are in arrays. document.layer[i]
Make "i" a variable and index the array.
"Additionally, any layer that is given a name with the ID attribute can be
accessed by name. For example, if a layer specifies ID="L2", you can refer
to it in Navigator as document.L2 or as document.layers["L2"]."
------IE---------------------------
Use CSS-P
----- Original Message -----
From: "Peggi & Ben Rodgers" <woodduck(at)mbay.net>
To: <hwg-techniques(at)hwg.org>
Sent: Tuesday, December 05, 2000 9:34 PM
Subject: Layer visibility & JavaScript
> Hi all,
>
> Our new company website (aka Peggi's Nightmare) is now in need of some
> JavaScript that's beyond my level of expertise. I'm hoping one of you
> JavaScript gurus can point me in the right direction.
>
> What I'm doing is this: I have a main menu nav bar consisting of a table
> with text inside. The submenus are absolutely positioned layers with an
> initial value of "hidden" and text menus in tables that will be linked to
> various pages (see www.agilent.com for an example of what I'm trying to
> achieve).
>
> What I want to do is this: When the main menu item is mousedOver, I would
> like to make the appropriate layer visible. When the mouse moves off I'd
> like it to disappear. That's easy enough with a mouseOut.
>
> But I'm confused about one thing (well, several really, but this one the
> most). How do I call a particular layer (I have six of them corresponding
> to the six main menu topics) when I mouseOver that main menu text? I keep
> thinking I have to write something like "document.layers.layer1" but that
> doesn't work. My reference books aren't helping with this as they don't
> give examples I can use and I haven't been able to find any scripts on the
> net to use as an example or modify either.
>
> Any help and/or sample scripts would be greatly appreciated.
>
> Peggi
> Peggi Rodgers
> Web Designer
> Axios Data Analysis
> 30 Ragsdale Dr. #201
> Monterey, CA 93940
> (831) 648-3436
> prodgers(at)axiosdata.com
>
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA