Print Page | Close Window

Web browser beforenavigate2

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=12249
Printed Date: 16 June 2024 at 8:09pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Web browser beforenavigate2
Posted By: PPL1
Subject: Web browser beforenavigate2
Date 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



Replies:
Posted By: PPL1
Date Posted: 03 October 2008 at 9:18am
Bump...


Posted By: Oleg
Date Posted: 06 October 2008 at 2:31am

Hi,

So don't set target=_blank and catch BeforeNavigate event...


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: PPL1
Date 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)


Posted By: Oleg
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net