...

View Full Version : Dynamic Image Maps



mgersting
01-21-2003, 09: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?

Gracias!
- Matt

scroots
01-21-2003, 10: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
http://javascriptkit.com/howto/imagemap.shtml

scroots

mgersting
01-22-2003, 12: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.

mgersting
01-22-2003, 02: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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum