GetTabId Method (HTMLCONTROL)


10.9, PLBCMP GUI Only

 

The GetTabId method retrieves the data-plbtabid attribute from a HTML element contained in a HTMLCONTROL object. The method gets the data-plbtabid attribute from the HTML element that has an id attribute that matches the id parameter. This method uses the following format:

 

[label]

{object}.GetTabId

[GIVING {return}] USING [*Id=]{id}[:

 

 

[*Flags=]{flags}]

 

Where:

label

Optional. A Program Execution Label.

object

Required. A HTMLCONTROL that is accessed.

return

Optional. A Character String Variable that returns a string from a HTML element.

Id

Required. A Character String Variable or literal that contains the HTML element id attribute.

flags

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

Flags Affected: EOS

Note the following:

  1. This method retrieves the data-plbtabid attribute value from a HTML element contained in a HTMLCONTROL object.

  2. The EOS flag is set if the returned data string is larger than the DIM variable used to receive the data.

  3. The {id} is a value that determines the HTML element used for data retrieval. The {id} string is matched against the id attribute of the HTML element.

  4. When the 'data-plbtabid' is being used, the HTML objects will be placed in the PL/B tabbing order as members of the HTMLCONTROL.

  5. The numeric value of the data-plbtabid is used to set the PL/B tabbing order from lowest to highest.

  6. A data-plbtabid of zero (0) causes the HTML object to be removed from the PL/B tabbing order.

  7. The {flags} parameter is a bitmask value that forces specialized behaviors for the execution of this method.

Example of GetTabId Method:

 

For a HTMLCONTROL that contains a HTML element as follows:

 

<input type='text' class='myClass' data-plbenable='on' data-plbtabid='1' id='MyEdit'>

 

This PL/B GetTabId method returns a value using the following instruction:

 

     HtmlControl.GetTabId Giving MyValue Using *ID="MyEdit" 

 

In this example, the data-plbtabid HTML attribute is retrieved from the HTML element with the id attribute of "MyEdit".

 

The MyValue variable returns a string as follows:

 

     1

 

 

See Also: HTMLCONTROL Method Syntax



PL/B Language Reference