|
Posted by Jonathan N. Little on 07/20/05 01:49
Martin wrote:
> On Tue, 19 Jul 2005 17:27:29 +0100, Steve Pugh <steve@pugh.net> wrote:
>
>
>>Martin <martinvalley@comcast.net> wrote:
>>
>>
>>>I have some .png images that have transparent areas in them. I'm
>>>executing some scripting in the onclick event. I would like for this
>>>to occur only when the pointer is over the visible portion of the
>>>image but, in Firefox, the transparent areas are clickable also.
>>
>>Only in Firefox? I would have thought that <img src="foo.png alt="foo"
>>onclick="whatever()"> would affect the whole image in _all_ browsers.
>
>
> Actually, I'm using different code to display the image in different
> browsers:
>
> In Firefox:
>
> <p style="position:absolute; left:100; top:180; height:10px;
> width:10px; z-index:3; cursor:hand;"> <img
> src='./graphics/TestFile.png' onClick="alert(this.title);"
> title="Device: Device Name Wire: 21"></p>
>
> In Internet Explorer:
>
> <p style="position:absolute; left:100; top:180; height:10px;
> width:10px; z-index:3; cursor:hand;
> filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='./graphics/ConvCurve.png');"
> onClick="alert(this.title);" title="Device: Device Name Wire:
> 21"></p>
>
> In IE, the "hand" cursor appears only when it's over the visible part
> of the image; in Firefox, it appears when it's anywhere over the
> image.
>
>
>
>>If it is only in FF then I suspect that you have something more
>>complex going on, possibly involving CSS positioning. Just a wild
>>guess as you didn't provide a URL to demonstrate your problem.
>>
>>
>>>Is there any way to prevent this?
>>
>>Only by using an image map.
>>
>> Steve
>
>
Are you sure in IE the 'hand' cursor is *only* occurring over the
visible parts of the image and not really over the 10x10 rectangle on
the image dimensions? How about a URL? I'd like to see this one!
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Navigation:
[Reply to this message]
|