Re: Onchange is fired after BeforeNavigate
- From: "Igor Tandetnik" <itandetnik@xxxxxxxx>
- Date: Wed, 24 Jan 2007 11:22:51 -0500
lemax <lemax@xxxxxx> wrote:
I'm hosting the IE-Webbrowser Control in an C++ Application.
I have implemented EventSinks for all BrowserEvents like
DocumentComplete & Beforenavigate.
At DocumentComplete i add an Eventsink via the Advise-Mechanism.
The HTML-Testpage contains a Selectbox with a javascript that gets
called on onchange.
The javascript initiates a Navigation to another url.
Here is the Problem :
When i select something in the Selectbox, the BeforeNavigate for the
new Page gets called before the OnChange-Event in my EventListener is
called.
Is there a way to get the Events in the right direction, because i
wan't to cancel the Event-Propagation (that the javascript is called)
for some selected items in the selectbox.
JavaScript handler always runs before any handler attached via
connection point. By the time your handler runs, JavaScript one has
already finished so you obviously can't prevent it from executing.
I'm also not sure what you mean by "cancel event propagation". If by
"event propagation" you mean bubbling, then onchange event doesn't
bubble.
--
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
.
- Follow-Ups:
- Re: Onchange is fired after BeforeNavigate
- From: lemax
- Re: Onchange is fired after BeforeNavigate
- References:
- Onchange is fired after BeforeNavigate
- From: lemax
- Onchange is fired after BeforeNavigate
- Prev by Date: Onchange is fired after BeforeNavigate
- Next by Date: HTML From Stream with Scripts
- Previous by thread: Onchange is fired after BeforeNavigate
- Next by thread: Re: Onchange is fired after BeforeNavigate
- Index(es):
Loading