Thanks Richard!
This does seem to fix the problem in IE 4+ and NS 4+, but now NS6 now allows
the the click event to go through.
I think I can catch it by making the target of the href
'javascript:void(null)' - but that's pretty ugly.
As long as I can get it working, I'm happy!
- Abre
-----Original Message-----
From: Richard Bennett [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 13, 2001 1:26 PM
To: [EMAIL PROTECTED]
Subject: Re: [Dynapi-Help] onClick on href
Yeah, I noticed this too, I guess DynAPI is returning a true in the
onmousedown listener. If you do it like this it still works:
<a href="javascript:alert('2');" onmousedown="alert('1');return
false;">link</a>
This only shows alert(1)
Cheers,
Richard Bennett
[EMAIL PROTECTED]
www.richardinfo.com
(Everything running on, and ported to the 19/12/2000 snapshot of DynAPI2)
Find the DynAPI faq here:
http://sourceforge.net/docman/display_doc.php?docid=656&group_id=5757
Browse the mailinglist here:
http://www.mail-archive.com/index.php3?hunt=dynapi
----- Original Message -----
From: "Abre Chase" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 13, 2001 6:42 PM
Subject: [Dynapi-Help] onClick on href
> I'm having a problem with onclick events and the dynAPI. When I include
the
> dynAPI library, even before initiating any dynlayers, the following code
> executes both the onClick AND the href.
>
> <a href="javascript:alert('2');" onClick="alert('1');return
false;">link</a>
>
> The return false *should* cancel the href, but somehow it is getting
> through. I've seen lots of examples of similar code on this list, has
> anyone else encountered this problem? It seems to happen in all browsers,
> except NS 6.
>
> My goal is to have an image wrapped in an href, which calls a function
> onClick and does *not* execute the href.
>
> Thanks for any advice!
>
> - Abre Chase
>
> _______________________________________________
> Dynapi-Help mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/dynapi-help
>
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help