Capture URL from HTMLviewer

Hi all: my application is opening a URL, but it should register the pages that are loaded when the user moves to other pages. If my application was a web browser, I would say: I’d like to capture the string in/from the URL field.

Is there a way to do this in Xojo?

thanks

gert

Check out the DocumentBegin, DocumentProgressChanged, and DocumentComplete events for the HTMLViewer control.

The URL is one of the parameters passed to those events.

Jared, thanks for your help.

Sorry, I don’t see how I can read the URL from any of these 3 events…

gert

The parameter “URL as String” is passed to all three of those events.

HTMLViewer.DocumentComplete(URL as String)

If you have a property on your window called “urlHistory()” for example, you can just put this in the DocumentComplete event.

urlHistory.Append URL

Jared, perfect! Thanks a million.

gert