Search the web
Sign In
New User? Sign Up
delphi-webbrowser · Delphi: Using IE's WebBrowser
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Detecting navigation initiated from address bar   Message List  
Reply | Forward Message #10257 of 10267 |
Re: Detecting navigation initiated from address bar

Hi!

Thanks for getting back, though this doesn't seem to apply to my need.
I need to differentiate between (top level frame) navigation initiated from
address bar, or from clicking a link within browser.

I know that I can check for pDisp parameter in BeforeNavigate but I think this
won't give me the info I need above.

Thanks

> have u checked if the pdisp (parameter of beforenavigate
> is <> from browser.defaultinterface. I use it to make difference between
frames and maindocument.
>
> --- In delphi-webbrowser@yahoogroups.com, "crulex32" <crulex@> wrote:
> >
> > Hi,
> >
> > I'm developing a .NET application that involves recording macros from within
Internet Explorer sidebar (as well as external application hosting MS WebBrowser
control that does the same thing).
> >
> > I need to detect when the navigation event (e.g. BeforeNavigate2 or
DocumentCompleted) is initiated from the Address Bar, rather than clicking links
or any AJAX/script on the page.
> > (Actually I don't care much about AJAX for now, but I need at least filter
any navigation initiated by clicking links).
> >
> > My first idea (seems not very straightforward though is:
> > 1. When a link/button is clicked within the WebBrowser, set a flag
indicating that navigation was caused by clicking a link.
> > 2. See if any Navigating or Navigated event occurs during some timeout after
the link was clicked. If none, assume that the link/button doesn't lead to
navigating to other page.
> > 3. When the DocumentCompleted event fires, reset the flag (which was set at
#1). If the flag was not set, assume that the call was initiated from address
bar.
> > Need to handle possible redirection somehow as well.
> >
> > Other ideas include:
> > - like my first idea, but analyze the link/button to see if it will produce
navigation event or not. So, we won't need the step #2.
> > - detecting mouse clicks/keystrokes when the address bar is active (VERY
unwanted because of possible issues with Protected Mode and IE8 threading
model).
> >
> > I'd appreciate any hint or sharing your practical experience regarding this.
> >
> > (Note, I'm using C#/.NET 3.5 here but it shouldn't matter much, I'm not less
familiar with Delphi and Visual C++).
> >
> > Thanks in advance for your help
> >
>





Wed Apr 15, 2009 11:07 pm

crulex32
Offline Offline
Send Email Send Email

Forward
Message #10257 of 10267 |
Expand Messages Author Sort by Date

Hi, I'm developing a .NET application that involves recording macros from within Internet Explorer sidebar (as well as external application hosting MS...
crulex32
Offline Send Email
Mar 30, 2009
12:04 am

have u checked if the pdisp (parameter of beforenavigate is <> from browser.defaultinterface. I use it to make difference between frames and maindocument....
cedmart1_fr
Offline Send Email
Mar 30, 2009
6:38 am

Hi! Thanks for getting back, though this doesn't seem to apply to my need. I need to differentiate between (top level frame) navigation initiated from address...
crulex32
Offline Send Email
Apr 15, 2009
11:08 pm

Hi, ... 1'st problem as the normal event mechanism will give you the mouse click AFTER the navigation is initiated you might run into some timing issues 2'end...
Senfer, Kurt
lexicalis
Offline Send Email
Apr 16, 2009
6:54 am

Thanks for the help Kurt! I'm unsure yet if I'll actually proceed with implementing IHtmlEditDesigner - might be in the next version of software I'm...
crulex32
Offline Send Email
Apr 28, 2009
1:24 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help