WebPageSetActionUrlAbs Function

Action

Modifies the action URL of a subsequent WebPageSubmit or WebPageSubmitBin function using an absolute URL specified by the sUrl parameter.

If only the action URL of an HTML form is changed with client side scripting, all fields of the parsed form can be used and the action URL can be changed to any valid URL using this function.

Include file

WebAPI.bdh

Syntax

WebPageSetActionUrlAbs(  in sUrl    : string,
                         in formUrl : form optional ): boolean;

Return value

  • true if the operation completed successfully

  • false otherwise

Parameter Description
sUrl Absolute URL to the file on the server. All characters that are part of the query string are not URL-encoded.
formUrl Form identifier used in the dclform section (optional). The expanded form string is appended to the URL after the "?". All unsafe characters are URL-encoded.

Example

dcltrans
  transaction TMain
  begin
    WebPageUrl("http://lab3/shopit/", "ShopIt - Greetings");
    WebPageLink("Join the experience!", "ShopIt - New Visitor");
    WebPageSetActionUrlAbs("http://lab3/welcome.asp");
    WebPageSubmit("Continue", FORM_NULL, "ShopIt - Main menu")
  end TMain;