1. Daniel Ferrreira
  2. PowerBuilder
  3. Friday, 21 July 2023 21:03 PM UTC

Hi guys,

I have a window that uses the new webBrowser control, with a simple web page from my company.

This control is ok, but I'd like to see if you can help me do one or two things:

1. When the user clicks on a link, I'd like to open the default web browser, instead of inside the current control. This is the main issue.

2. Would it be possible to add, maybe a tag on the hyperlink, so that I can decide if I want to open the clicked link on the control or on the default browser? This is a plus, not mandatory.

I used the code below to open the web browser, on my addressChange event, it worked but it also navigates the control. I guess I could navigate back, but that would not be a great way to do things. I couldn't find, like a "return 1" to stop navigating.

inet inet_base
GetContextService("Internet", inet_base)
inet_base.HyperlinkToUrl(newurl)

Thanks a lot

 

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 21 July 2023 21:17 PM UTC
  2. PowerBuilder
  3. # 1

Hi Daniel;

  The new Web Browser control is built-in to PB.

This looks like the old way of invoking an external Web Browser via the deprecated HyperLinkToURL command.

What PB version are you using?

Regards ... Chris

Comment
  1. Chris Pollach @Appeon
  2. Monday, 24 July 2023 21:26 PM UTC
Hi Tobias Daniel;

Yes, I've seen this requirement before as well and I think, that there was an enhancement request around this too.

I think that we need the internal web browser to support tab pages. Then these secondary urls and / or pop-ups might be then better supported (my guess).

Regards... Chris
  1. Helpful 1
  1. Tobias Roth
  2. Friday, 28 July 2023 07:19 AM UTC
Hi Chris,

Thanks for the reply.

I think both would be very good to have in the future, however some companies only allow certain browsers to browse the internet. For example, we only have local websites in use and to access a URL the installed browser must be used. It would be very desirable if additionally the NewWindowRequested event of webview2 is available as an event in the webbrowser control.

Regards Tobi
  1. Helpful
  1. Chris Pollach @Appeon
  2. Friday, 28 July 2023 12:12 PM UTC
Hi Tobias;

Please open an enhancement request support ticket for the support of the "NewWindowRequested" event in the WebView2 web browser engine.

Regards.... Chris
  1. Helpful
There are no comments made yet.
Daniel Ferrreira Accepted Answer Pending Moderation
  1. Saturday, 22 July 2023 04:22 AM UTC
  2. PowerBuilder
  3. # 2

Hi guys,

Chris, I'm using PB 2022, with the new webBrowser control.

Roland, so as of today, I can't achieve my intended behavior? I would have to wait for the enhancement?

I have the "PopupWindow" option checked, but still it's not opening on a popup. In some cases it does, but I haven't figured out when. Still, this would be just informative, I don't intend to use the popup.

I logged a few of the events from the control. Below is an example. It is opening the links on the same control and also on the external web browser. My script to open the external browser is on the addressChange event.

I opened google, searched for Appeon, clicked on the link for the Brazilian supplier.

01:05:49 navigationStart
01:05:49 resourceRedirect https://www.google.com/?gws_rd=ssl
01:05:49 addressChange https://www.google.com/?gws_rd=ssl
01:05:49 titleTextChanged Google
01:05:50 addressChange https://www.google.com/?gws_rd=ssl
01:05:50 titleTextChanged Google
01:05:58 navigationStart
01:05:58 addressChange https://www.google.com/search?q=appeon&source=hp&ei=jlW7ZIbJBO365OUP6Zep4AU&iflsig=AD69kcEAAAAAZLtjnn-21qr2B7xbVpRqmwKSFB_77jHG&ved=0ahUKEwiGyNzxt6GAAxVtPbkGHelLClwQ4dUDCAk&uact=5&oq=appeon&gs_lp=Egdnd3Mtd2l6IgZhcHBlb24yBRAAGIAEMgUQABiABDIFEAAYgAQyBRAAGIAEMgQQABgeMgQQABgeMgQQABgeMgQQABgeMgQQABgeMgQQABgeSOkTUIEIWIAScAF4AJABAJgBfaABsQWqAQMwLja4AQPIAQD4AQGoAgrCAhAQABgDGI8BGOoCGIwDGOUCwgIQEC4YAxiPARjqAhiMAxjlAsICERAuGIAEGLEDGIMBGMcBGNEDwgIIEC4YsQMYgATCAgUQLhiABMICCxAuGIAEGLEDGIMBwgILEAAYgAQYsQMYgwHCAgsQLhiABBjHARjRA8ICCBAAGIAEGLEDwgILEAAYigUYsQMYgwHCAg4QLhiABBixAxjHARjRA8ICChAAGIoFGLEDGArCAgoQABiABBixAxgKwgIHEAAYgAQYCg&sclient=gws-wiz
01:05:58 titleTextChanged appeon - Google Search
01:05:59 addressChange https://www.google.com/search?q=appeon&source=hp&ei=jlW7ZIbJBO365OUP6Zep4AU&iflsig=AD69kcEAAAAAZLtjnn-21qr2B7xbVpRqmwKSFB_77jHG&ved=0ahUKEwiGyNzxt6GAAxVtPbkGHelLClwQ4dUDCAk&uact=5&oq=appeon&gs_lp=Egdnd3Mtd2l6IgZhcHBlb24yBRAAGIAEMgUQABiABDIFEAAYgAQyBRAAGIAEMgQQABgeMgQQABgeMgQQABgeMgQQABgeMgQQABgeMgQQABgeSOkTUIEIWIAScAF4AJABAJgBfaABsQWqAQMwLja4AQPIAQD4AQGoAgrCAhAQABgDGI8BGOoCGIwDGOUCwgIQEC4YAxiPARjqAhiMAxjlAsICERAuGIAEGLEDGIMBGMcBGNEDwgIIEC4YsQMYgATCAgUQLhiABMICCxAuGIAEGLEDGIMBwgILEAAYgAQYsQMYgwHCAgsQLhiABBjHARjRA8ICCBAAGIAEGLEDwgILEAAYigUYsQMYgwHCAg4QLhiABBixAxjHARjRA8ICChAAGIoFGLEDGArCAgoQABiABBixAxgKwgIHEAAYgAQYCg&sclient=gws-wiz
01:06:00 titleTextChanged appeon - Google Search
01:06:12 navigationStart
01:06:13 addressChange https://osbsoftware.com.br/fabricante/appeon
01:06:13 titleTextChanged Appeon | Revendedor Oficial no Brasil | OSB Software
01:06:15 resourceRedirect https://px.ads.linkedin.com/collect?v=2&fmt=js&pid=2787377&time=1689998775629&url=https%3A%2F%2Fosbsoftware.com.br%2Ffabricante%2Fappeon&cookiesTest=true
01:06:16 resourceRedirect https://www.linkedin.com/px/li_sync?redirect=https%3A%2F%2Fpx.ads.linkedin.com%2Fcollect%3Fv%3D2%26fmt%3Djs%26pid%3D2787377%26time%3D1689998775629%26url%3Dhttps%253A%252F%252Fosbsoftware.com.br%252Ffabricante%252Fappeon%26cookiesTest%3Dtrue%26liSync%3Dtrue
01:06:16 resourceRedirect https://px.ads.linkedin.com/collect?v=2&fmt=js&pid=2787377&time=1689998775629&url=https%3A%2F%2Fosbsoftware.com.br%2Ffabricante%2Fappeon&cookiesTest=true&liSync=true
01:06:16 resourceRedirect https://px4.ads.linkedin.com/collect?v=2&fmt=js&pid=2787377&time=1689998775629&url=https%3A%2F%2Fosbsoftware.com.br%2Ffabricante%2Fappeon&cookiesTest=true&liSync=true&e_ipv6=AQLppTHHhu1PtAAAAYl7xpsw3cqkz9Ny8A6g9GzERjJFz8572wInJruqVFhANk_0eTHCJ2iKI1yQbLk_0DKaJIkb352wXpAt
01:06:16 titleTextChanged Appeon | Revendedor Oficial no Brasil | OSB Software
01:06:16 titleTextChanged Appeon | Revendedor Oficial no Brasil | OSB Software

Thanks!

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.