Jump to content

FormA, FormB, FormC, FormD - How can FormD call FormB and execute procedure


andyhill

Recommended Posts

FormA calls FormB which calls FormC which calls FormD via ShowModal.

 

Is this the best way to call FormB from FormD and execute my desired procedure ?

 

procedure TFormD.UnimFormTitleButtonClick(Sender: TUnimTitleButton);

begin
  case Sender.ButtonId of
      0:  begin
             // Seperator
           end;
      1:  begin

             FormB.Show;

             UniSession.AddJS('ajaxRequest(FormB.HTMLFrame, "_FormDRequest", []);');
             ...
 
 
 
procedure TFormB.UnimHTMLFrameAjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings);
begin
  if SameText(EventName, '_FormDRequest') then begin
    ...

 

 

 

After executing and building the necessary data in FormB for FormD I want to return to FormD and remove this activity from history so when the FormD Close Button is executed it takes me back to FormC.

Link to comment
Share on other sites

×
×
  • Create New...