Jump to content

Communication between 2 unigui app


delagoutte

Recommended Posts

Hello,

i need 2 application that could communicate between themself.

I try create a prototype.

 

I create a unigui app (salve app) with a memo and on mainForm i use onajaxEvent

procedure TMainForm.UniFormAjaxEvent(Sender: TComponent; EventName: string;
  Params: TUniStrings);
begin
  UniMemo1.Lines.Add(EventName+' : '+Params.Text);
end;

i create a second app(master app) with a uniurlframe with URL property : the adress of slave app

i add a unibuton with this code

procedure TMainForm.UniButton1Click(Sender: TObject);
begin
UniSession.AddJS('ajaxRequest('+UniURLFrame1.jsname+', "_CustomWEvt", ["Param1=Value1"])');
end;

the slave app don't receive "_CustomWEvt" from master app.

 

 

What is not correct?

How can communicate from slave app to master app ?

 

Projects code in join file

Link to comment
Share on other sites

(1) UniUrlFrame1 is part of master, so the request goes to the master app.

 

(2) You can access the content of an UniUrlfFrame (= iframe) and call a JS function (for example), but only if the server and port is the same (browser security) -> only with ISAPI (same port!)

 

(3) use a XHR to other server

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...