JqGet Method (Client)
PLB Web Only, 9.9
The JqGet method retrieves low level HTML element properties, css styles, values, text, or HTML contents from the client browser. The method gets the request data from the first HTML element of a set of elements matching selector criteria. The method uses the following format:
|
|
|
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
object
Required. A CLIENT object that has been declared.
return
Optional. A Character String Variable that returns a string from a HTML element depending on the {name} data type.
selector
Required. A Character String Variable or literal that contains HTML element selection criteria.
Required. A Character String Variable or string literal that identifies the type of data to be retrieved from the HTML element.
Flags Affected: EOS
Note the following:
This is an advanced method that is required only when custom coding is performed using the JQuery framework.
The EOS flag is set if the returned data string is larger than the DIM variable used to receive the data.
The {selector} is a filter that determines a set of HTML elements for data retrieval. The {selector} string is sent to the jQuery API exactly as received from the PLB program variable. See this link for more information about the {selector} criteria:
The {name} identifies the type of data retrieved from the set of HTML elements matching the {selector} criteria. Depending on the {name} data type being retrieved, the data may come from the first HTML element in the set of elements or the returned data may be retrieved from all of the HTML elements in the element set. This element data access behavior can be determined from jQuery API documentation links found at:
The {name} parameter can be a pre-defined special name or it can be an HTML attribute, css, or property name for the HTML element being accessed.
The pre-defined special name and the HTML attribute names are only returned when the current {flags} value is set to zero (0).
|
Special |
Comment |
More information ... |
|
Html |
Html Contents |
http://api.jquery.com/html/ |
|
Text |
Text all elements |
http://api.jquery.com/text/ |
|
Val |
Current value |
http://api.jquery.com/val/ |
|
{attr |
A valid jQuery attribute name |
http://api.jquery.com/attr/ |
If the {flags} is set to access CSS styles (value 0x0001) or to access HTML element properties (value 0x0002), the {name} gives the specific CSS or property name to retrieve.
|
Css/Prop |
Comment |
More information ... |
|
{cssname} |
A valid css name for the HTML element |
http://api.jquery.com/css/ |
|
{propname} |
A valid jQuery property name |
http://api.jquery.com/prop |
The {options} parameter is a bitmask value the forces specialized behaviors for the execution of this method. The bitmask values are defined as follows:
|
Option |
Value |
Meaning ... |
|
$JQ_FLAG_CSS |
1 |
When this bit is set, the {name} must be set to a valid CSS style name for the HTML element being accessed. See this URL: http://api.jquery.com/css/ |
|
$JQ_FLAG_PROP |
2 |
When this bit is set, the {name} must be set to a valid property name for the HTML element being accessed. See this URL: http://api.jquery.com/prop/ |
The {return} string depends on the {name} data type being requested.
Example:
In this example, the CSS style named "color" is retrieved from the first radio button checked.
The GetCss variable returns a string as follows:
See Also: CLIENT, Client Methods, Method Syntax
![]() |