Retrieving the URL from the Browser Control

Visual LANSA

Retrieving the URL from the Browser Control

This section shows you how you can retrieve the value of a property from the browser control.

The browser control has a property LocationURL which retrieves the URL of the resource that the browser is currently displaying:

To use this property, add a push button and field to your form to retrieve the URL:

Set the properties of the button and the field:

Push button control

caption('Get URL')

Field STD_TEXTS

caption('URL:') labeltype(Caption) marginleft(50)

In the Click event of the push button, add this code to retrieve the URL:

EVTROUTINE HANDLING(#PHBN_1.Click)

change field(#std_texts ) to(#VA_WEBCTL.LocationURL) 

ENDROUTINE

 

Compile and execute the form. When the LANSA page is displayed in the browser control click on the Get URL button to see the URL:

 

Ý 7.1.7 Using an ActiveX Control