Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.6j

Application v 6.5c

  

 

Chapter ElevenSGML Functions (continued)

HTMLElementGetValue Function

Overview

The HTMLElementGetValue function retrieves a specified property from the HTML Element Object.

Syntax/Parameters

Syntax

dword = HTMLElementGetValue ( handle hHE, dword token | string property );

Parameters

hHE

A handle specifying the HTML Element Object.

property

A dword or string specifying an SDK defined HTML or CSS property, as token or string name. For example, CP_MARGIN_TOP token for the CSS margin-top property or just “margin-top” as a string.

Return Value

A dword containing a property’s value or zero on failure. Use the GetLastError function to retrieve a formatted error code.

Remarks

For standard W3C defined attributes and properties, SDK defined token values can be referenced with the following standard prefixes:

HA_ — HTML attribute. for example, HA_ALIGN or HA_SIZE for “ALIGN=” or “SIZE=”

CP_ — CSS property, for example, CP_TEXT_ALIGN or CP_MARGIN_TOP for “text-align” or “margin-top”

Note for defined values, any where a dash ‘-’ is used in a name, it is replaced with an underbar ‘_’. See Appendix A — Legato SDK Standard Definitions for a complete list of definitions. For CSS properties, note that shorthand values are always converted to their constituent components, for example, “margin: 0pt” will have four properties for top, right, bottom and left. As such, specifying a shorthand property name will return as unsupported.

When using a string as a property name, adding a ‘+’ prefix will force the value to be a CSS property and to ignore the HTML attribute names.

Values can have five states: the value, mixed, default, error or unsupported. See the Section 11.7 The HTML Element Object† for additional information. 

This function differs from HTMLElementGetString in that the value returned is a pvalue. For example, PT_IMPLIED for a default value. Since the value can be aggregated, strings cannot be represented as a pvalue. A string value will be returned as PT_STRING with a help index of zero, which is invalid.

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE, Legato Basic

Page revised 2026-07-20