Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Controls
  New Posts New Posts RSS Feed - Web browser beforenavigate2
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Web browser beforenavigate2

 Post Reply Post Reply
Author
Message
PPL1 View Drop Down
Groupie
Groupie


Joined: 10 April 2006
Location: Canada
Status: Offline
Points: 70
Post Options Post Options   Thanks (0) Thanks(0)   Quote PPL1 Quote  Post ReplyReply Direct Link To This Post Topic: Web browser beforenavigate2
    Posted: 24 September 2008 at 4:39pm
I have a WebBrowser control with some very simple html content (a few links). All links open up in a new window (target=_blank).
 
I want the link to open with the user's default browser, not IE. To do this, I need to trap the hyperlink click event, cancel it and do a shellexecute.
 
My problem is that beforenavigate2 event does not seem to be generated when the link target is _blank. This is expected since strickly speaking it isn't the control that is navigating, but a new browser window.
 
I tried the NewWindow2 event, but it does not have the clicked URL (an object is passed but it is set to nothing) ...
 
How can I trap the hyperlink click event when target=_blank ?
 
Thanks
Back to Top
PPL1 View Drop Down
Groupie
Groupie


Joined: 10 April 2006
Location: Canada
Status: Offline
Points: 70
Post Options Post Options   Thanks (0) Thanks(0)   Quote PPL1 Quote  Post ReplyReply Direct Link To This Post Posted: 03 October 2008 at 9:18am
Bump...
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 06 October 2008 at 2:31am

Hi,

So don't set target=_blank and catch BeforeNavigate event...
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
PPL1 View Drop Down
Groupie
Groupie


Joined: 10 April 2006
Location: Canada
Status: Offline
Points: 70
Post Options Post Options   Thanks (0) Thanks(0)   Quote PPL1 Quote  Post ReplyReply Direct Link To This Post Posted: 12 October 2008 at 5:19pm

Yes this is sometimes a valid solution. However consider this case:

  • You display a web page in your app. You can't control the content and,
  • When the use clicks on a link, you want to open it in the client's default browser (not IE)
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 13 October 2008 at 6:30am
Hi,
Pierre , think you understand that our Webbrowser is just wrapper around standard control.
If Standard WebBrowser doesn't send BeforeNavigate  for links with target=_blank we cant change it :( I sure WebBrowser from Microsoft ActiveX will work same.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.