Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread sendig parameters to WEBMODULE
Sun, Jul 9 2017 11:22 AMPermanent Link

Paul Waegemans

IMS bvba

Avatar

I send multiple parameters to my module using TServerRequest using the following code:

with ServerRequest do
  begin
     Method := rmPost;
     URL := 'modules/ewbmodule';
     Params.Clear;
     Params.Add('SessionAddress='+frmhoofdmenu.L_Ftpserverparameters.columns['HOST'].asstring);
     Params.Add('SessionUser='+frmhoofdmenu.L_Ftpserverparameters.columns['USERID'].asstring);
     Params.Add('SessionPassword='+frmhoofdmenu.L_Ftpserverparameters.columns['Password'].asstring);
     Params.Add('SessionDb='+frmhoofdmenu.L_Ftpserverparameters.columns['USERID'].asstring);
     Params.Add('ContactID='+IntToStr(v_contact_ID));
     Execute;
  end;

Now I need to send the same parameters when I upload files to the server using TFileComboBox in combination with THtmlForm using the following code:

with HTMLForm1 do
    begin
    url := 'modules/ewbmodule';
    submit;
    end;

How can I send the parameters??




Mon, Jul 10 2017 4:28 AMPermanent Link

Matthew Jones

Paul Waegemans wrote:

> with HTMLForm1 do
>      begin
>      url := 'modules/ewbmodule';
>      submit;
>      end;
>
> How can I send the parameters??

Create edit boxes on the form with the name property set to the names of the parameters, and set them to the values you need. You can have them invisible if you wish.

--

Matthew Jones
Mon, Jul 10 2017 10:58 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Paul,

<< How can I send the parameters?? >>

Per email:

Just set the parameters in-line as part of the URL:

MyHTMLForm.URL:='http://www.mysite.com/submitform?param1=value&param2=value&param3=value

Tim Young
Elevate Software
www.elevatesoft.com
Image