HTMLViewer.LoadURL

From Xojo Documentation

Method

HTMLViewer.LoadURL(URL as String)

Supported for all project types and targets.

Loads the passed HTTP URL. Any protocol other than HTTP may or may not work as that is dependent on operating system behavior.

Notes

On macOS, you need to ensure the URL is prefixed with "http://" or "https://" in order for it to load.

Example

This example loads a URL entered by the user in a TextField:

Var url As String = URLField.Value
If Left(url, 7) <> "http://" Then url = "http://" + url
HtmlViewer1.LoadURL(url)