function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Maros Sitko1Maros Sitko1 

Response from canvas publish

Hi,
is there any way how I can send and receive some message from publish function in canvas?

I have Visualforce page, where I have code
Sfdc.canvas.controller.publish({name : 'myFunction', payload : {element : name, value : val} , target : {canvas : 'app1'}});
In my PHP site I have 
Sfdc.canvas(function() {
    Sfdc.canvas.client.subscribe(sr.client,
          {name : 'marosdev.fieldChangedCanvas', onData : function (event) {....return 'Ok';}}
    );
});

I want receive message from my php site, let's say 'Ok'. Is there some solution simple solution?
I know only one, in PHP site, call other javascript function in visualforce page afrer code in subscribe will end.