Share this page

# web_reg_save_param_attrib

Correlation Functions for C

Registers a request to save dynamic data in a server response that has been formatted as HTML. The data is saved to a parameter.

## C Language

int web_reg_save_param_attrib("ParamName=<output parameter name>", TagName=<value>, Extract=<value>, [Name=<value>, ] [Id=<value>, ] [Class=<value>, ] [Type=<value>, ]<List of Attributes>, <SEARCH FILTERS>,LAST );

Argument | Description
--- | ---
The name of HTML element.
Extract | The name of HTML attribute whose value will be saved to parameter.
Name | The value of the HTML element's "name” attribute.
Id | The value of the HTML element's “id” attribute.
Class | The value of the HTML element's “class” attribute.
Type | The value of the HTML element's “type” attribute. For example, for the INPUT element, Type can be "hidden".
List of Attributes | For details of each attribute, see Attributes for Save Parameter Registration Functions. Attribute value strings (e.g., "NotFound=warning") are not case-sensitive. See the Restrictions.
SEARCH FILTERS | Specifies the sections of the buffer to search for the data in. See Search Filters for Save Parameter Registration Functions See the Restrictions.
LAST | A marker that indicates the end of the argument list.

## Return Values

This function returns LR_PASS (0) on success, and LR_FAIL (1) on failure.

## Restrictions

- For the ContentType and HeaderNames search filters, Scope specifiers are not supported.

- Mixed quotes types are not supported for the target attributes, for example, `name=‘Tom”`.

- When the innerHTML parameter is specified, it only supports the simple text innerHTML (all the characters between the current end tag and the next start tag). For example, this function will find “Development” correctly, but will not to detect the `img` element as the innerHTML of the `td` tag.

<a class="contextBarText" href="#">Development</a>

<td class="contextBarText" align="left">

<img src="/LCSW/images/context_arrow.gif" alt="" border="0" align="absmiddle">

</td>

For more information on the DFES argument, see Attributes for Save Parameter Registration Functions.

For more information on the HeaderNames arguments, see Search Filters for Save Parameter Registration Functions

For more information on the RelFrameID argument, see Search Filters for Save Parameter Registration Functions and RelFrameID Attribute.

## Example

This example shows the use of web_reg_save_param_attrib to look for correlation values of a hidden form element inside the HTML page.

Copy code

    web_reg_save_param_attrib(
              "ParamName=corrparam1",
              "TagName=input",   // case insensitive for the tag name or attribute name
              "Extract=value",
              "Name=field1",  // case sensitive for the attribute value
              "Type=*",  // use * to match any value for TYPE attribute. TYPE attribute must exist, otherwise the search will fail
              SEARCH_FILTERS,
              "IgnoreRedirections=No",
              LAST);
    web_reg_save_param_attrib(
             "ParamName=corrparam2",
            "TagName=p",
            // case insensitive for the tag name or attribute name
              "Extract=innerHTML",  // extract the innerHTML instead of any attribute value, innerHTML is case insensitive
              "Name=field2",  // case sensitive for the attribute value
              "Id=*",
              SEARCH_FILTERS,
              "IgnoreRedirections=No",
              LAST);

Tips to improve your search results... VuGen Function Reference Version 26.1-26.3 Function Reference 26.1-26.3 All View Local Help Center View Online Help Center Version: