1. John Hnat
  2. PowerBuilder
  3. Thursday, 14 June 2018 18:32 PM UTC

Our software includes a Log-a-Call item.  If clicked, this item opens a browser window and navigates to the page on our site where clients may enter support calls.

For various reasons, management has tasked us to revise this functionality.  Instead of opening a browser window (Chrome, IE, etc.), they want this feature to open a (PB) window that contains the browser control on it, and that automatically goes to the Log-a-Call page on our web site.  The window/browser control should meet the following requirements:

1.  The Log-a-Call page on our site should load without errors and with full functionality (the web developer who designed that page used WordPress, and included several WordPress-only extensions that may not be interpreted correctly by older/more stringent browser controls);

2.  It should not have an address bar, so users cannot use the browsing capability to access other resources;

3.  It should allow us to intercept the clicked event, and check the source of a link that the user has clicked; if that resource is on a domain other than our own, then the user should receive an error message stating that the resource is not permitted.  (Many of our resources are pages with embedded YouTube videos, and we don't want users going to the main YouTube site and then searching for other videos.)

4.  It should allow us to intercept/disable right-clicked events, so that the user cannot right-click on the page and view the source code (or any other RMB menu options).

We've done some work with the Microsoft Web Browser OLE control provided in PB.  However, our web page returns all sorts of errors when viewed using that control (probably because that control is older?)

Any ideas on how to solve this problem are appreciated.

We are using PB 2017 R2, build 1769, Standard edition.

Thanks!

 

Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Friday, 10 July 2020 15:45 PM UTC
  2. PowerBuilder
  3. # 1

Hi Gary, 

The OLE browser is now an obsolete feature and we strongly encourage customers not to use it.

There is a new WebBrowser control in PB 2019 R2, which is Chrome engine.  Therefore, it shouldn't have compatibility issue or security issues of Internet Explorer.  Even Microsoft switched to Chrome for their Edge browser.

The issue is that I'm not sure there is a way to accomplish your requirement #3 with this feature, and we do not have plans to make such enhancement.  

If you have flexibility on point #3, then I think you should get started now with the new WebBrowser control.  Here is link to the documentation: https://docs.appeon.com/pb2019r2/objects_and_controls/ch02s150.html

Best regards,
Armeen

Comment
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Thursday, 14 June 2018 19:38 PM UTC
  2. PowerBuilder
  3. # 2

The Microsoft Web Browser control is in IE7 mode by default. There is a way to tell it to use IE11 mode. You have to add a registry setting with the exe name.

My web browser example:

http://www.topwizprogramming.com/freecode_webbrowser.html

Explanation of how to set the version mode:

https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/general-info/ee330730(v=vs.85)#browser-emulation

 

Comment
  1. Gary Ault
  2. Friday, 10 July 2020 15:16 PM UTC
Thanks, Roland, for your example and the tip. I had a page using some ajax libraries that was rendering fine in IE but not in your example application. I changed the registry setting as recommended and now it works!
  1. Helpful
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.