View Full Version : Dynamic Image Maps

01-21-2003, 10:53 PM
Hey all,
Did some looking around and I couldn't seem to find any cut and dry info on creating/accessing image maps in JavaScript. Anybody have some simple DOM-compliant code they could share?

- Matt

01-21-2003, 11:00 PM
i do believe they act in the same was as hyperlinks as you can link an image map to a page
<area shape="circle" coords="245,30" href="#" OnClick="do()">

a bit more about image maps


01-22-2003, 01:34 AM
Thanks, scroots, but my question isn't about adding JavaScript actions to the areas themselves, but actually accessing and modifying the Map's properties from a JavaScript...say something like this:

document.MyImageMap.area.coords = "34,24,23,24";

Hope that makes more sense.

01-22-2003, 03:42 AM
I also tried another approach with no success. I tried creating two seperate Image Maps with different names. Then I tried using JavaScript to switch the value of USEMAP on a given image. It comes up as "undefined"....anyone have some help?

This would really be a lifesaver!

- Matt