andyhill Posted February 7, 2018 Share Posted February 7, 2018 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 More sharing options...
Sherzod Posted February 7, 2018 Share Posted February 7, 2018 Hi, if I understand you correctly, maybe you just need to use a callback ? Link to comment Share on other sites More sharing options...
andyhill Posted February 7, 2018 Author Share Posted February 7, 2018 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 ? Link to comment Share on other sites More sharing options...
Sherzod Posted February 7, 2018 Share Posted February 7, 2018 Hi, I'm sorry, it seems I did not correctly understand your question, please can you clarify again ?! Link to comment Share on other sites More sharing options...
andyhill Posted February 8, 2018 Author Share Posted February 8, 2018 I have approached this from another angle - thanks anyway. Link to comment Share on other sites More sharing options...
Sherzod Posted February 8, 2018 Share Posted February 8, 2018 Ok, no problem Link to comment Share on other sites More sharing options...
Recommended Posts