How can I know when the URL I specified to Navigate method get loaded?
- From: "yuzhu.shen" <yuzhu.shen@xxxxxxxxx>
- Date: Sat, 12 Apr 2008 07:45:46 -0700 (PDT)
Hi, everyone.
I don't know whether this is a stupid question, but I really hope that
you can help me out of it:
I ask the control to navigate with a url "http://foo.bar", then I want
to get the notification when it gets loaded (say, in
NavigateComplete2()). I think up several possible approaches, but I
think they may be all problematic:
Approach (1) Since the input URL of NavigateComplete2 may have been
modified (by server side redirection, etc.), I cannot test whether
this URL equals to "http://foo.bar".
Approach (2) After I invoke Navigate(), I just treat the NEXT
NavigationComplete2 on the top-level frame to be the "http://foo.bar".
However, I think this may be wrong in some rare too, here is an
example:
Invoke Navigate() with "http://not.foo.bar" --> Invoke Navigate() with
"http://foo.bar" --> OnNavigateComplete2( "http://not.foo.bar" ) -->
OnNavigateComplete2( "http://foo.bar" )
Approach (3) Instead of invoking Navigate() to navigate, I think maybe
I can use ITravelLogStg::CreateEntry() with "http://foo.bar", and get
a travel entry FooBarEntry, and then use
ITravelLogStg::TravelTo(FooBarEntry). In OnNavigateComplete2(), I
simply test whehter the current entry is FooBarEntry to know whether
the url has been loaded.
However, when the control just starts up and has no travel entry at
all, invoking ITravelLogStg::CreateEntry() will get an exception in
ieframe.dll !! As a result, before the first travel entry is set up (I
believe it is set up just before the NavigateComplete2 event), I
cannot use this approach.
So, I still cannot conquar the example I mentioned in Approach 2....
Anyone can help me out of this? Thanks very much in advance! My boss
is pushing me....
.
- Follow-Ups:
- Re: How can I know when the URL I specified to Navigate method get loaded?
- From: Igor Tandetnik
- Re: How can I know when the URL I specified to Navigate method get loaded?
- Prev by Date: Re: catch the url clicked in MSN pop window?
- Next by Date: Re: How can I know when the URL I specified to Navigate method get loaded?
- Previous by thread: catch the url clicked in MSN pop window?
- Next by thread: Re: How can I know when the URL I specified to Navigate method get loaded?
- Index(es):
Relevant Pages
|
|