Url Method
The Url method displays a URL in a SubForm.
This method has the following syntax: =
integer = SubForm.Url(url = varchar(16000) | html = StringObject, pageloadevent = varchar(32));
This method has the following parameters. Note that you may specify either the url or html parameter, but not both.
url
Specifies the URL
html
Specifies HTML coding as a string on Webview2
pageloadevent
Specifies the user event to trigger after the page is loaded
This method returns ER_OK if successful or ER_FAIL for failure. Descriptions of system constant values and their numeric equivalents are listed in
Error Codes.
Example:
FIELD(subform1).Webpage = TRUE;
// frame.flush() is mandatory if FIELD(subform1).Url() is called during Form.initialize() block.
curframe.flush();
FIELD(subform1).Url(url='https://www.actian.com', pageloadevent = 'NAVIGATIONCOMPLETE');
on userevent 'NAVIGATIONCOMPLETE' =
{
message 'Webpage: ' + varchar(StringObject(CurFrame.MessageObject).value);
}
When the webpage is loaded, the userevent NAVIGATIONCOMPLETE will be called; it is mentioned as pageloadevent parameter in the Url method. CurFrame.MessageObject will contain the URL. We do not recommend placing other controls on a SubForm while using it to display a URL.
Last modified date: 06/25/2024