PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
New WINDEV and WINDEV Mobile 26 feature!
  • Overview
  • Manipulating an HTML Display control in the code
  • Displaying information in an HTML Display control
  • Getting the value of an HTML Display control
  • Preventing the user from using a link in a page
  • Associated WLanguage properties
  • Properties specific to HTML Display controls
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Manipulating an HTML Display control in the code
Overview
The HTML Display control is used to display a Web page in an application. Thus, in 1 line of code, without using an external browser, your WINDEV applications can display a page of a website.
The HTML Display control can be manipulated directly in the code. Simply use the HTML Display control variable. The HTML Display control variable is the name of the HTML Display control. The variable type is a character string.
You can also manipulate HTML Display controls in the code using HTML Display control management functions.
This help page explains how to manipulate an HTML Display control in the code.
Manipulating an HTML Display control in the code

Displaying information in an HTML Display control

To display information in an HTML Display control, simply assign a value
For example:
  • Direct assignment:
    HTM_WebPage = "http://www.windev.com"
  • Assignment by variable:
    HTM_WebPage = MyPage
You can also use the Value or URL properties.

Getting the value of an HTML Display control

To get the content of an HTML Display control (the user can use the links in the page displayed in the control):
  • Simply assign a value. For example:
    HTMLContent = HTM_HTMLDisplayControl
  • Use the Value property.

Preventing the user from using a link in a page

By default, in the HTML Display control, the user can use the various links in the page displayed in the control.
To limit the use of these links, you can use the "Before loading the HTML page" event.
For the following example, let's assume that the list of authorized sites is contained in a WLanguage array.
PROCEDURE ChangePage(sUrl is string, sDestination is string)
ArrAuthorizedSites is array of 2 strings
ArrAuthorizedSites[1] = "windev.com"
ArrAuthorizedSites[2] = "google.com"
let sDomain = URLExtractPath(sUrl, urlDomain)
IF ArraySeek(ArrAuthorizedSites, asLinearFirst, sDomain) = -1 THEN
ToastDisplay("Unauthorized site", toastShort, vaMiddle)
RESULT False
END
RESULT True
This code returns False if the site is not authorized and displays a toast.
Associated WLanguage properties

Properties specific to HTML Display controls

The following properties are used to manage the characteristics of an HTML Display control in the code:
Versions 26 and later
Body
New in version 26
Body
Body
The Body property is used to identify and modify the HTML body of an HTML Display control or an HTML Editor control.
Versions 26 and later
Document
New in version 26
Document
Document
The Document property is used to identify or modify the HTML document associated with an HTML Display control or an HTML Editor control.
Versions 15 and later
SecurityHtml
New in version 15
SecurityHtml
SecurityHtml
The Property SecurityHtml makes it possible to know and modify the report of the security mechanism of the HTML display fields and HTML Editor fields..
Versions 09 and later
URL
New in version 09
URL
URL
The Property URL allows you to:
  • Find out the address associated with a control.
  • Modify the address associated with a control.
For a complete list of WLanguage properties that can be used with an HTML Display control, see Properties associated with the HTML Display control.
Minimum version required
  • Version 26
This page is also available for…
Comments
Click [Add] to post a comment