Eveline said:
Hi,
I have multiple overlapping layers. I would like to change visability of a
layer by clicking on a polygon. Any idea how the code should look like?
Thanks in advance,
Eveline
Assuming you have an area map just to toggle layer(s)' visibility, then
<img alt="to be defined" height="234" src="path/filename.ext" title="to
be defined" usemap="#MapArea" width="345">
<map name="MapArea">
<area alt="to be defined" coords="x1, y1, x2, y2, ..., xN, yN" nohref
onclick="if(document.getElementById('targetLayerId').style.visibility ==
'visible') {document.getElementById('targetLayerId').style.visibility =
'hidden';} else
{document.getElementById('targetLayerId').style.visibility =
'visible';}; return false;" shape="poly">
Next time, please provide more details like url to view your webpage,
browsers to support, rendering mode, etc..
DU
--
Javascript and Browser bugs:
http://www10.brinkster.com/doctorunclear/
- Resources, help and tips for Netscape 7.x users and Composer
- Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x
http://www10.brinkster.com/doctorunclear/Netscape7/Netscape7Section.html