Jump to content
uniGUI Discussion Forums
Sign in to follow this  
andyhill

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

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.

Share this post


Link to post
Share on other sites

Hi,

 

if I understand you correctly, maybe you just need to use a callback ?

Share this post


Link to post
Share on other sites

Could you show me how please because if I do not use FormB.Show; before the ajaxRequest(FormB.HTMLFrame, "_FormDRequest", []); it says FormB does not exist ?

Share this post


Link to post
Share on other sites

Hi,

 

I'm sorry, it seems I did not correctly understand your question, please can you clarify again ?!

Share this post


Link to post
Share on other sites

I have approached this from another angle - thanks anyway.

Share this post


Link to post
Share on other sites
Sign in to follow this  

×