Telegram_2020-08-06T09

<< Click to Display Table of Contents >>

Navigation:  Telegram > 2020 > 08 > 06 >

Telegram_2020-08-06T09

Telegram link

 

2020-08-06T09:02:18

 

Now, if you want to send a Value to intraweb after an Event at browser side is triggered, like requesting for a value, clicking on a Column of a Grid, or any othe JS/Jquery/Ajax event, you need to use an Intraweb Callback

 


 

Telegram link

 

2020-08-06T09:08:03

 

at Intraweb side (using ANON methods):

 

procedure TIWForm45.IWAppFormCreate(Sender: TObject);

 

begin

 

RegisterCallBack('PROCESS_ID',

 

procedure (aParams: TStrings; out aResult: string; out aHandled: Boolean)

 

var

 

xName: string;

 

xValue:Integer;

 

begin

 

in this case a wil send json object {

 

ame\: \ID, \value\: 1} //\value\ can contain your ID value

 

xName := aParams.Values['name'];

 

xValue := StrToIntDef(aParams.Values['value'], 0);

 

//process the values as you need//

 

end

 

);

 


 

Telegram link

 

2020-08-06T09:13:42

 

at JS side, you will do something like:

 

var idnum = $(this).find(“td”).eq(1).html();

 

ajaxCall(\PROCESS_ID\, {

 

ame\: \id\, \value\: idnum}, false);

 


 

Telegram link

 

2020-08-06T09:16:00

 

or

 

ajaxCall(\PROCESS_ID\, \&id=\+idnum, false); //aParams.Values['id']

 


 

Telegram link

 

2020-08-06T09:17:59

 

for an example of how to work with callbacks check the demo:

 

type: link https://github.com/Atozed/IntraWeb/tree/master/15/Delphi/NewCallback

 


 

Telegram link

 

2020-08-06T09:56:34

 

Is that what are looking for Sokel? ????

 


 

Telegram link

 

2020-08-06T09:58:09

 

I am still trying what you have sent me. I will let you know