WebPageQueryParsedUrl Function

Action

This function is used to retrieve the URL parsed because of a WebPageParseUrl function call with the WEB_FLAG_PARSE_URL flag set.

Include file

WebAPI.bdh

Syntax

WebPageQueryParsedUrl( out sResult    : string,
                       in  nResultLen : number,
                       in  sUrl       : string,
                       in  nUrlNumber : number optional,
                       in  sFrame     : string optional,
                       in  hContext   : number optional): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
sResult String variable that receives the parsed URL.
nResultLen Maximum length of the URL to return. This value must be less than or equal to the size of the string variable sUrl.
sUrl Name that has been specified by the WebPageParseUrl command
nUrlNumber The nUrlNumber appearance of the URL is retrieved (optional). If this parameter is omitted the first appearance is taken.
sFrame The name of the frame the where the URL should be searched (optional). If this parameter is provided, the URL is searched only within this frame document.
hContext Context, stored by a prior call of the WebPageStoreContext function, where to search the URL (optional). If this parameter is omitted the URL is searched in the actual page and all stored contexts.

Example

dcltrans
  transaction TMain
  var
    sResult : string;
  begin
    WebPageParseUrl("Continue", "load=\"", "\"");
    WebPageUrl("http://lab3/shopit/", "ShopIt - Greetings");
    WebPageLink("Join the experience!", "ShopIt - New Visitor");
    WebPageQueryParsedUrl(sResult, STRING_COMPLETE, "Continue", 2);
    WebPageUrl(sResult, "Continue");
  end TMain;