WebGetPageInfo Function

Action

Retrieves information about the actual page, such as the number of hyperlinks or forms.

Include file

WebAPI.bdh

Syntax

WebGetPageInfo( in  nOption : number, 
                out nValue  : number ) : boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
nOption

Can be one of the following values:

  • WEB_PAGE_INFO_HREF. Specify this option to retrieve the number of hyperlinks in the actual page.

  • WEB_PAGE_INFO_FORMS. Specify this option to retrieve the number of HTML forms in the actual page.

  • WEB_PAGE_INFO_FRAMES. Specify this option to retrieve the number frames in the actual page.

nValue Variable, that receives the specified value.

Example

dcltrans 
  transaction TWeb 
  var
    nValue : number; 
  begin
    WebPageUrl("http://standardhost/"); 
    WebGetPageInfo(WEB_PAGE_INFO_HREF, nValue);
    Print(string(nValue)); 
    WebGetPageInfo(WEB_PAGE_INFO_FORMS, nValue);
    Print(string(nValue)); 
  end TWeb;