PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

X
Y
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.
Note: 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.
Note: At run time, the initial value of the "class" attribute corresponds to the concatenation of values defined in edit (with the space character as separator) in the description window of the control.
<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 page may not be displayed properly by the browser.
  • 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 required version
  • Version 20
Comments
Click [Add] to post a comment