![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Here's my situation: I have four image maps in a certain document. They're exactly the same, except that different javascript arguments are passed to a function when they're clicked: img name="myimg" src="/images/myimg.jpg" usemap="#mapA" / map name="mapA" area shape="rect" coords="0,0,20,15" href="javascript:f(0)" / !-- ... -- /map img name="myimg" src="/images/myimg.jpg" usemap="#mapB" / map name="mapB" area shape="rect" coords="0,0,20,15" href="javascript:f(1)" / !-- ... -- /map And so on. My question: Is there a way to use only one image map for the four images here and still get the appropriate script calls? |
#3
| |||
| |||
|
|
Why not use just the <img>-tag with javascript: onClick like this: img name="myImg1" src="/images/myimg.jpg" onClick="f(this)"; |
#4
| |||
| |||
|
|
Raymond Loman <raymond (AT) raymondloman (DOT) nl> spoke thus: Why not use just the <img>-tag with javascript: onClick like this: img name="myImg1" src="/images/myimg.jpg" onClick="f(this)"; Well, that'd be fine, except that the image is actually a map, so using the img.onClick attribute doesn't help me much unless I break the image map into its component images. |
![]() |
| Thread Tools | |
| Display Modes | |
| |