Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with Registered callback methods
#4
Hi Leo. I made a demo using callback on AsyncClick.
Code:
procedure TIWForm1.IWAppFormCreate(Sender: TObject);
begin
   WebApplication.RegisterCallBack('clbkGridSel', clbkGridSel);
end;

procedure TIWForm1.clbkGridSel(aParams: TStrings );
begin
  fGridSelection := aParams.Values['Selection'];

  WebApplication.
  CallBackResponse.
   AddJavaScriptToExecuteAsCDATA( 'document.getElementById("IWEDIT1").value = "' + fGridSelection + '"' );

  WebApplication.ShowNotification( fGridSelection );
end;

procedure TIWForm1.IWButton1AsyncClick(Sender: TObject;
  EventParams: TStringList);
begin
  WebApplication.
  CallBackResponse.
   AddJavaScriptToExecute( 'ajaxCall("clbkGridSel", "Selection=something", false);' );
end;


Attached Files
.zip   LeoBruno.zip (Size: 57.01 KB / Downloads: 19)
Reply


Messages In This Thread
RE: Help with Registered callback methods - by Jose Nilton Pace - 08-17-2019, 10:09 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)