WebLink.URL

From Xojo Documentation

Property (As String )
aWebLink.URL = newStringValue
or
StringValue = aWebLink.URL

New in 2010r5

Supported for all project types and targets.

The URL of the page to display when the link is clicked. If the URL does not include a protocol (like http:), the value will be appended to the URL.

Notes

When a valid URL is specified, the MouseDown and MouseUp event handlers are not called; the page at the URL is simply displayed.

If you want to have a WebLink call your own code, you should set the URL to "javascript:;" or "#" and put your code in the MouseUp event.

To navigate to other pages in your app, use the WebPage.Show method.

If you want to display the page at the URL within your web app, use the WebHTMLViewer control.

Examples

Display wikipedia when the link is clicked:

Link1.URL = "http://www.wikipedia.org"

To display a simple message when the link is clicked, set the URL to "javascript:;" and put this code in the MouseUp event handler:

MessageBox("Clicked!")

To have a link open another page in your web app, set the URL to "javascript:;" or "#" and use the Show method to display the page in the MouseUp event handler:

SettingsPage.Show