Re: How to handle javascript pseudo-url?



On Apr 18, 4:53 am, "Igor Tandetnik" <itandet...@xxxxxxxx> wrote:
<key8...@xxxxxxxxx> wrote in message

news:1176882841.821993.237800@xxxxxxxxxxxxxxxxxxxxxxxxxxxx

Ok, I think I figured out why this is happening, but I'm not sure of
the best way to fix it. My control is also sinking
HTMLDocumentEvents2::OnClick, and when I get the OnClick event for
this link, my OnClick() handler function is returning VARIANT_TRUE.
If I return FALSE, the page works properly and no navigation happens.

The problems is - in the typical case, I want to return VARIANT_TRUE
in order to allow the click to proceed. So how can I determine whether
the click is on one of these special types of URLs where I want to
return FALSE from my handler?

Try looking at event.returnValue. I believe it should reflect the value
returned by the most recent handler.

I had assumed that returning
VARIANT_TRUE would tell the browser to process the click normally,

Your handler fires after the script handler, so yours has the last word.
The browser does process the click "normally" - meaning, it navigates to
the URL <a> tag refers to.
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925

I tried get_returnValue(), but it just returns a VT_EMPTY variant. Is
there any other way?

.