views:

148

answers:

2

i have two tables with images that parts of them are transparent and i want to ignore mouse interactions (especially clicking) on these parts and assign the click to the image in the other table that below.

(i hope you understand because english is not my native language.) thanks..

A: 

Image map should do it.

David Murdoch
A: 

I'm afraid this is not likely to be possible. The bounding box for HTML elements are rectangular, even for elements with transparency. It is for this bounding box that mouse events fire on.

The event will propagate through the parent elements, so if your other element is one of the parents you can still capture the click event, but it will fire for both elements.

Andy E
so there is nothing i can do to get around this?
TomBS
@TomBS: As David Murdoch mentioned, you could use a `<map>` for the topmost image, with one `<area>` element for the transparent part. This `<area>` element would have an `onclick` handler which would trigger the `onclick` for the bottom image. Short of doing that, there's nothing else you could do.
Andy E