Log in

View Full Version : Image Map ID Conflicts



argentum13
02-13-2007, 12:25 PM
I am using a button to open an image map from which selecting a name will go to a page of that name.

Below is the code:

The problem I'm having is a conflict with the "id" tags.

If I put the "id" tag inside the "div" tag, the menu drops down and returns onmouseout fine, but I can't separate the names on the image into separate parts to be able to select. The whole image becomes the selection.

If I put the "id" tag in the image map I'm able to select the individual names on the image exactly how I want to but then the image map won't drop down on mouseover.

I can have one or the other but not both.

Any help would be very much appreciated.


<!--first image (a button) used to control the second image-->
<a href="menu2.map"><img src="images/calculator.jpg" class="menu2" height="20" width="111" usemap="#men2" border="0" ISMAP onmouseover="moveTopDown(menu12);" /></a>

<!-- this is the map that actually moves when the id is in the div tag but the map doesn't work-->
<div id="menu12" class="menu12"
<a href="menu12.map"><img src="images/calcMenu.jpg" height="218" width="124" usemap="#menu12" border="0" ISMAP onmouseout="moveTopUp(menu12);"/></a>

<1-- with the id tag here in the map the map works fine but will not move-->
<map id"menu12" name="men12">
<area shape="rect" coords="15,40,100,57" href="scientific.html">
<area shape="rect" coords="15,72,100,89" href="business.html">
<area shape="rect" coords="15,102,100,119" href="standard.html">
<area shape="rect" coords="15,130,100,147" href="construction.html">
<area shape="default" href="desktop.html">
</map></div>



argentum1347@yahoo.com

boxxertrumps
02-13-2007, 03:03 PM
<div id="menu12" class="menu12">
<a href="menu12.map"><img src="images/calcMenu.jpg" height="218" width="124" usemap="#menu12" border="0" ISMAP onmouseout="moveTopUp(menu12);"/></a>

left out that symbol... it would cause your div to not be drawn in the browser.
also, the space after the quote was left out here...
onmouseout="moveTopUp(menu12);"/></a>