Skip to Content
author's profile photo Former Member
Former Member

Integrating web browser links/urls and PB objects

I would like to use PB 12 Classic to display an internal website and when a link on the web page is clicked it fires an action in PB that I can then respond to (and consume) inside the classic application. I know that the web browser can be embedded inside PB using OLE objects. Is there a way for PB to interact with the browser?

Example:

A Web Page displays a list of products. Each product has a link to "Select". When the "Select" link is clicked in the browser, the PB application is "aware" and can retrieve detail information in a different window (Sheet) about that product.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 21, 2014 at 02:42 AM

    Hi Matt,

    I wrote a PowerBuilder application that does almost exactly what you describe (Mafia Manager), however it was accomplished using the web browser OLE object that you do not want to use. I may have misunderstood and you DO not mind using the OLE object as long as you can fire PB code from actions within the OLE object and the answer is, yes you can and it isn't too difficult.

    You can fire PB code based on actions in the web page being hosted in the OLE object using the InternetData function, which exists in a descendant of the InternetResult class and is called automatically by the context when the user does something (e.g. clicks a url) in the current web page.

    Look at InternetResult and Inet classes, and the GetUrl and InternetData functions to get you on the right track. If I remember right there are other events/functions that you can use to determine what the current URL is and what action was taken. IF you need me to dig up my code from that program send me an email and I'll do it.

    Hope this helps.

    Rich Bianco

    http://www.displacedguy.com

    PowerBuilder, .NET Blog

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 20, 2014 at 11:04 PM

    Hi Matt;

    You can use an OLE container and insert the IE active-X (MS Web Browser Control) from the O/S into your PB application. Then, you can direct the IE control to your specific web location by setting the "LocationURL" property.

    HTH

    Regards ... Chris

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.