<class home>  <Jscript>   <back   next>

Show/Hide Layers

Some people like to use layers instead of loading in Frames or new pages. You can, for example, build a navigation and show and hide layers to view content.

example>>>


Showing and Hiding Layers

*note: you must have layers in your file to do this. Make some layers and set them to be hidden in the properties panel.

1. In the behaviors panel, select a browser version 4 and above.

2. In the document window, select the object you want add the behavior to. If it is the whole page, select the whole body tag, opening to closing, or click on the work <body> in the bottom of the document window.

*note: If you are using a link that doesn't need to go anywhere, put in a "#" symbol in the URL box, or the word "Javascript:;"
ex.


3. In the Behaviors Panel select the Show-Hide Layers action.

4. In the dialog box that follows, select the layer you want seen, choose to show it, and then set all other layers to hide. If you have links doing this, you will need to set all layers to either show or hide for each link. Click o.k.

5. In the Behaviors Panel select an event from the pull down (ex. onMouseDown).