1. Frank Zettanucci
  2. PowerBuilder
  3. Saturday, 4 May 2024 01:11 AM UTC

Using the webbrowser control is there a way to load a url then prevent the user from navigating to any links other than ones in a list of approved urls ?

Which events should I be looking at to code

I looked at scripting in 'addresschange' and 'navigationstart' events

in addresschange event i found i could evaluate the uri variable in addresschange and using wb_1.StopNavigation()

is this the right approach?

Frank.

 

 

 

John Fauss Accepted Answer Pending Moderation
  1. Saturday, 4 May 2024 02:12 AM UTC
  2. PowerBuilder
  3. # 1

For a question such as this, I believe it would be helpful for us to know which version, release and build of PowerBuilder you are using and which browser (chromium or webview2) are you using.

Best regards, John

Comment
  1. Frank Zettanucci
  2. Saturday, 4 May 2024 17:05 PM UTC
How do i know if its using chromium or webview2 ? Its the powerbuilder web control
  1. Helpful
  1. John Fauss
  2. Monday, 6 May 2024 13:35 PM UTC
Appeon changed the underlying web browser "engine" used by the PowerBuilder web browser control beginning in PB 2022 R2. Because of this recent change, it was important to know the version, release and build of PB that you are using. We have no way of knowing what version of PB you are using, so regardless of the particulars of the question it is ALWAYS a good idea to mention the version, release and build in your question.

I see from your separate response that you are running PB 2022 R3. The solution you have proposed sounds reasonable, but I'm unable to judge whether this is the only or best approach. Have you tried it? If not, please do so, and update this thread with the results. Perhaps others in the Community will offer their insight and experience, but I would not wait in the hopes of hearing from them. Good luck!
  1. Helpful
There are no comments made yet.
Frank Zettanucci Accepted Answer Pending Moderation
  1. Saturday, 4 May 2024 12:48 PM UTC
  2. PowerBuilder
  3. # 2

Using Powerbuilder 2023 R3 edition of the stock web browser control that comes with PB

 

 

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 7 May 2024 14:36 PM UTC
  2. PowerBuilder
  3. # 3

Hi Frank;

  The 2022 R3 release introduced the WebView2 engine "under the hood" to drive the built-in Web Browser control as the new standard.

AFAIK, there is no way to prevent this from happening. I think that this would be an enhancement request.

Regards .. Chris

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.