Executing serverconnect from javascript

Hi,

I am trying to execute a serverconnect from a javascript function using the following code but it seems that it is ignored:

dmx.parse(fileAskingProcessStep2.load({base64msg: '${encodedMessage}', requestid: ${item.id}}));

The function works well but the serverconnect is not triggered. I have tried to trigger the function using a simple button onclick event or a dmx-on:success but no luck. Is there another way of doing it?

Thank you

Using a flow?
dmx.parse("flow1.run({param1: 'param1', param2: 'param2'})");

I found the solution:

the serverconnect needs to be on the layout page, not on the content page.