1. malka tzarfati
  2. PowerBuilder
  3. Monday, 1 July 2024 10:44 AM UTC

Hi, I my working with PB 22 app ,

I have webbrowser control , and i do  navigate to a URL.

ad the address url , just The main URL is show at chrom not like i.e.

the URL shown in the address bar , does not change no matter how deep the user is and no metter what the user press.

Is there any way for me to know what's the current URL of the user?

 

For example, The Main url is: www.example.com

It has 3 internal links:

www.example.com/aboutus

www.example.com/contactus

www.example.com/pictures

 

no matter where the user is. The address bar will always show www.example.com.

My Question: How do I know what's the current url of the user?

 

 

Benjamin Gaesslein Accepted Answer Pending Moderation
  1. Tuesday, 2 July 2024 10:29 AM UTC
  2. PowerBuilder
  3. # 1

Have you tried the website in a regular browser to see if navigating actually changes the URI?

Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Monday, 1 July 2024 16:32 PM UTC
  2. PowerBuilder
  3. # 2

Hi, Malka -

See if the following will help:

1. Create an String instance variable in the window that contains the web browser control, named is_most_recent_uri.
2. In the web browser control's NavigationStart event, assign the string argument named "uri" to the instance variable.

The instance variable will then contain the most recent URI.

If you want to keep a session history, make the instance variable an unbounded String array and append each URI to the array. If you do this, I'd suggest adding some limits on the number of array elements or logic to keep only a subset of the entire history (say, the last 100 URI's). 

HTH. Best regards, John

Comment
  1. malka tzarfati
  2. Tuesday, 2 July 2024 07:10 AM UTC
Hi John ,

Thank you for your answer ,

Unfortunately, it still doesn't work .

I can't find the url that i'm using at real time ...
  1. Helpful
  1. John Fauss
  2. Tuesday, 2 July 2024 17:55 PM UTC
Simply saying "it doesn't work" does not help me or anyone else understand what the problem might be. I threw together a quick test yesterday prior to posting my suggestion, and it works fine.

Perhaps you can put together a small, example application that performs what you are trying to do, zip the pbl, target and workspace into a .zip file, and post it in a new response in this thread so that others can take a look at what you are doing.
  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.