PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | French EN

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
..HTMLClass is used to read and modify the value of the HTML "class" attribute of the control.
Remark: The value of the HTML "class" attribute is used to (among other things) select the CSS styles applied to the control.
Example
// Applies a CSS to style the control if an error occurs
// and systematically targets the control to apply an auto-completion JS
IF Position(EDT_Edit, "@") = -1 THEN
   EDT_Edit..HTMLClass = "InputInError ui-autocomplete"
ELSE
   EDT_Edit..HTMLClass = "InputValid ui-autocomplete"
END
Syntax

Reading the value of the "class" attribute Hide the details

<Result> = <Control name>..HTMLClass
<Result>: Character string
Value of the "class" attribute. If this attribute contains several values, the different values are separated by space characters.
Remark: At runtime, the initial value of the "class" attribute corresponds to the concatenation of values defined during editing (with the space character as separator) in the control description window.
<Control name>: Character string (with or without space characters)
Name of control to use.

Modifying the value of the "class" attribute Hide the details

<Control name>..HTMLClass = <New value>
<Control name>: Character string (with or without quotes)
Name of control to use.
<New value>: Character string (with quotes)
New value for the "class" attribute. If this attribute contains several values, the different values are separated by space characters.
Caution:
  • This parameter is case sensitive.
  • The existing content of the "class" attribute is overwritten with the new value.
Remarks
  • No check is performed on the value. In HTML, all the characters are allowed. If an invalid value is assigned, the browser will probably display the page with errors.
  • The HTML "class" attribute actually found in the HTML includes in addition a specific content added by WEBDEV to define the style and to make sure that the control operates properly. This additional content is not accessible by ..HTMLClass.
Minimum version required
  • Version 20
Comments
Click [Add] to post a comment