Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

image MAP change on area click

Status
Not open for further replies.

vascobrito

Technical User
Feb 27, 2003
28
PT
Hi there, i have set 18 areas in a image MAP. on mouseover in each area ,it will show different hidden layers. The Image is a gif and i would like to change the color in the selected area on mouseover. is there any way to do this? change color within a gif? or is it possible to set diferent images MAP according to the selected area, setting layers?
what i have:

<div id=1>
<table...>
<tr><td>
</td></tr>
</table>
</div>
<div id=2>
<table...>
<tr><td>
</td></tr>
</table>
</div>
...
<img src="img1.gif" usemap="#mapa">
<map name="mapa">
<area shape="rect" cords="9,197,89,259" onmouseover="javascript:showlayer(1)" onmouseout="javascript:hidelayer(1)" href="javascript:disableshowhidelayer">
<area shape="rect" cords="16,338,76,380" onmouseover="javascript:showlayer(2)" onmouseout="javascript:hidelayer(2)" href="javascript:disableshowhidelayer">
...
</map>
 
Change the .src property of the image map from your onmouseover/out code to show an image with the correct section highlighted.

I suggest you preload all the images.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top