View Full Version : Hotspots in Image Map Not Working

09-04-2012, 06:01 PM

I am creating an image map in dreamweaver and although I have done it before and it worked perfectly, for some reason when I try to link to alternative pages on the website I am working on the links don't work.

Originally, when i viewed the image map in firefox and hovered over the links, they display the proper html to go to, but when I click the link it adds that html code to the code already in the URL bar and therefore just stays on the page I'm already on instead of linking to the correct page.

Then, I noticed that in my coding after (href=) there was a (#) before ("file://) etc. I removed that and it fixed the problem for the link when I clicked on it in firefox preview.

The problem is, I removed the (#) before all of the files, but now the link only works in the image map for the first link I click on. So now the link will take me to the correct page in the website, but when I try to click on a second or third link in the image map it does what it was doing before - it adds that html link to the already existing link in the URL bar and stays on the current page.

If anyone has any idea what is going on here I would love any help!
I will post my code below for you to look at:

<p> <img src="stills/mapdemo.png" alt="Web Map" border="0" usemap="#map" />

<map name="map" id="map">

<area shape="circle" coords="426,300,10" href="file:///C|/Users/Key%20West/Desktop/walkerton_website/pilot_plant.html" alt="Link 1" />

<area shape="circle" coords="449,325,8" href="file:///C|/Users/Key%20West/Desktop/walkerton_website/slow_sand_filtration.html" alt="Link 2" />

<area shape="circle" coords="412,318,8" href="file:///C|/Users/Key%20West/Desktop/walkerton_website/ultra_filtration_membrane.html" alt="Link 3" />




09-04-2012, 11:16 PM
This is your code:
<area shape="circle" coords="426,300,10" href="file:///C|/Users/Key%20West/Desktop/walkerton_website/pilot_plant.html" alt="Link 1" />

and probably your links are not working because your "href" above is pointing to a directory on your computer and when you upload the file to your webhost the link is broken so, the code should probably be something like this:

<area shape="circle" coords="426,300,10" href="http://www.website .com/walkerton_website/pilot_plant.html" alt="Link 1" />

do you see the difference.