GetDisabled Method (HTMLCONTROL)


10.9, PLBCMP GUI Only

 

The GetDisabled method is primarily used to get the disabled attribute as a boolean from a HTML element contained in a HTMLCONTROL object. The method gets the disabled attribute from the HTML element that has an id attribute that matches the id parameter. This method uses the following format:

 

[label]

{object}.GetDisabled

[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 of either False or True.

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 disabled attribute as a boolean 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. The {flags} parameter is a bitmask value that forces specialized behaviors for the execution of this method.

  5. The {return} string will be either False or True .

Example of GetDisabled Method:

 

For a HTMLCONTROL that contains a HTML element as follows:

 

<input type='checkbox' id='MyCheck' checked>

 

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

 

     HtmlControl.GetDisabled Giving MyValue Using *ID="MyCheck" 

 

In this example, the disabled attribute is retrieved from the HTML element with the id attribute of "MyCheck".

 

The MyValue variable returns a string as follows:

 

     False

 

 

See Also: HTMLCONTROL Method Syntax



PL/B Language Reference