PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Overview
  • Control in a window, report, or static or dynamic page
  • Use in a page
  • Creating an HTML control
  • Creating an HTML control in a page
  • Creating an HTML control in a report
  • Control in a page: Characteristics
  • Description window
  • Assignment
  • Control in a report: Characteristics
  • Description window and programming
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
Overview

Control in a window, report, or static or dynamic page

The HTML control can be used:
  • WEBDEV - Server codePHP In a page.
    The HTML control of a page is used to display or use an HTML code or a JavaScript code. This code can correspond to HTML scripts for example. The HTML control cannot be used to display an HTML page or an HTML site. This control can only be used to display an HTML code.
  • Versions 18 and later
    WEBDEV - Server codeWindows In a report.
    The HTML control of a report is used to print an HTML code or the content of a local page.
    New in version 18
    WEBDEV - Server codeWindows In a report.
    The HTML control of a report is used to print an HTML code or the content of a local page.
    WEBDEV - Server codeWindows In a report.
    The HTML control of a report is used to print an HTML code or the content of a local page.
This help page presents only the HTML control in pages or reports. For windows, please see the page about the HTML Display control.
WEBDEV - Server codePHP

Use in a page

The HTML control of a page is used to display or use an HTML code or a JavaScript code. This code can correspond to HTML scripts for example. The HTML control cannot be used to display an HTML page or an HTML site. This control can only be used to display an HTML code.
An HTML control can be programmed in server code only if the control is defined as being a "Dynamic" control. The HTML control cannot be associated with an item of a data file.
Caution:
  • When the control is defined as being a dynamic control, it can only be assigned by programming.
  • The option "Forbid the execution of JavaScript scripts" is checked by default ("General" tab of control description).
If the window displayed in the HTML control contains scripts and if the user clicks active areas in this HTML control (forms, tab, ...), the requested action triggers the opening of default browser and displays the URL of HTML control in order to allow the user to run these scripts.
To allow the user to navigate inside the HTML control, uncheck "Forbid the execution of JavaScript scripts".
Creating an HTML control
WEBDEV - Server codePHP

Creating an HTML control in a page

To create an HTML control in a page:
  1. On the "Creation" tab, in the "Integration" group, click "HTML".
  2. Click where you want to create the control in the page. The control appears in the editor.
To view the characteristics of the control, select "Description" in the context menu.
WEBDEV - Server codeWindows

Creating an HTML control in a report

To create an HTML control in a report:
  1. On the "Creation" tab, in the "Text" group, click "HTML".
  2. Click where the control will be created in the report. The control appears in the editor.
To view the characteristics of the control, select "Description" in the context menu.
Remark: From version 22, the HTML control in a report corresponds to an HTML Static control.
WEBDEV - Server codePHP
Control in a page: Characteristics

Description window

You can directly enter the HTML source code in the "General" tab of the control description window ("Edit HTML source code...").

Assignment

The encoding of the HTML code assigned by programming or by data binding in an HTML control in a page, must correspond to the encoding of the page. If the encoding of the HTML code is not identical to that of the page, the accents and special characters will not be rendered correctly.
For example, if an HTML code is used in an HTML control inside a WINDEV application, it will be encoded in UTF8. The site must also use UTF8:
  • On the "Project" tab, in the "Project" group, click "Description".
  • Select the "Language" tab.
  • Select the "Miscellaneous" tab.
  • Select "<UTF8>" in "Character set for ANSI configurations".
WEBDEV - Server codeWindows
Control in a report: Characteristics
Versions 18 and later

Description window and programming

The HTML control is an HTML Static control. You can enter text directly in the "General" tab of the control description window.. This text will be automatically converted to HTML.
The HTML control is used to display:
  • the content of a local HTML file.
  • the HTML content of an item.
To initialize the HTML control by programming, it can be assigned with:
  • an HTML code directly. For example:
    HTM_Code = "'''Hello'''"
  • the path of a local HTML file.
    HTM_Code = fExeDir() + "\MyHTMLFile.htm"
Remarks:
  • PNG and SVG images in the HTML content are not supported.
  • If the CSS style sheet corresponds to an external file, it is ignored.
  • All the external files that must be found on Internet are ignored.
  • JavaScript codes are not run.
New in version 18

Description window and programming

The HTML control is an HTML Static control. You can enter text directly in the "General" tab of the control description window.. This text will be automatically converted to HTML.
The HTML control is used to display:
  • the content of a local HTML file.
  • the HTML content of an item.
To initialize the HTML control by programming, it can be assigned with:
  • an HTML code directly. For example:
    HTM_Code = "'''Hello'''"
  • the path of a local HTML file.
    HTM_Code = fExeDir() + "\MyHTMLFile.htm"
Remarks:
  • PNG and SVG images in the HTML content are not supported.
  • If the CSS style sheet corresponds to an external file, it is ignored.
  • All the external files that must be found on Internet are ignored.
  • JavaScript codes are not run.

Description window and programming

The HTML control is an HTML Static control. You can enter text directly in the "General" tab of the control description window.. This text will be automatically converted to HTML.
The HTML control is used to display:
  • the content of a local HTML file.
  • the HTML content of an item.
To initialize the HTML control by programming, it can be assigned with:
  • an HTML code directly. For example:
    HTM_Code = "'''Hello'''"
  • the path of a local HTML file.
    HTM_Code = fExeDir() + "\MyHTMLFile.htm"
Remarks:
  • PNG and SVG images in the HTML content are not supported.
  • If the CSS style sheet corresponds to an external file, it is ignored.
  • All the external files that must be found on Internet are ignored.
  • JavaScript codes are not run.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment