JqSet Method (Client)


PLB Web Only, 9.9

 

The JqSet 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:

 

[label]

{object}.JqSet

[GIVING {return}] USING [*Selector=]{selector}:

 

 

[*Name=]{name},{*Value=]{value}[,[*Flags=]{flags}

 

Where:

label

Optional. A Program Execution Label.

object

Required. A CLIENT object that has been declared.

return

Optional. A Numeric variable that always returns zero.

selector

Required. A Character String Variable or literal that contains HTML element selection criteria.

name

Required. A Character String Variable or string literal that identifies the type of data to be retrieved from the HTML element.

value

Required. A Character String Variable or string literal that has the value string applied to the {name} data type.

flags
Optional. a Numeric Variable or decimal number that specifies a bit mask value that controls the behavior of this method.

Flags Affected: OVER, ZERO

Note the following:

  1. This is an advanced method that is required only when custom coding is performed using the JQuery framework.

  2. The ZERO flag is always set TRUE.

  3. The OVER flag is always set FALSE.

  4. 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:

  5.  

    http://api.jquery.com/category/selectors/

     

  6. The {name} iidentifies the type of data changed in the set of HTML elements matching the {selector} criteria. The affected HTML elements may depend on the {name} data type. However, in most cases, the behavior is to affect all HTML elements in the set of elements matching the selection criteria.

  7.  

    The {name} parameter can be a pre-defined special name or it can be a HTML attribute, css, or property name for the HTML element being accessed.

     

    The pre-defined special name and the HTML attribute names are only used when the current {flags} value is set to zero (0).

     

    http://api.jquery.com

     

    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

     

  8. The {options} parameter is a bitmask value the forces specialized behaviors for the execution of this method. The bitmask values are defined as follows:

  9.  

    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/

     

  10. The {return} string depends on the {name} data type being requested.

Example:

 

    Client.JqSet Using "##radio label": //Labels with id=#radio

                       "color": //Text color css style

                       "##FF0000": //Red color

                       $JQ_FLAG_CSS //CSS style type

 

In this example, the CSS style named "color" is changed to be red for all HTML labels with the selector id of '#radio'.

 

 

See Also: CLIENT, Client Methods, Method Syntax

 



PL/B Language Reference JsRun Method (CLIENT) Open Method (CLIENT)