RPCResponse.data undefined

Hello I’m a newbie with Smartclient so my question is probably very stupid.

I’m trying to connect smartclient with PHP using a button. Sending values
works fine but getting values back (from PHP) to smartclient is not working.
The RPCResponse.data keeps on giving undefined value back. What am I doing wrong? Or shouldn’t I use the RPCResponse.data for getting the
returned value back at all?

Here is my code:

isc.Button.create({
title:“test”,
click: function() {
var data = “sample input”;
RPCManager.sendRequest(
{
actionURL: “http://localhost/test.php”,
httpMethod:“POST”,
useSimpleHttp:true,
params:{“data”:data},
serverOutputAsString: true,
callback: Myshow(RPCResponse)
});
function Myshow(RPCResponse)
{
isc.say('ResponseString: ’ + RPCResponse.data);
}
}
})

and test.php:

<?php
$data=$_POST[‘data’];//Data from RPC is saved in this variable
print “returned value”;
?>

self-reply

forget my last post, I found the solution myself

here is the code:

isc.Button.create({
title:“test”,
click: function() {
var data = “sample input”;
RPCManager.sendRequest(
{
actionURL: “http://localhost/test.php”,
httpMethod:“POST”,
useSimpleHttp:true,
params:{“data”:data},
serverOutputAsString: true,
callback: “Myshow(rpcResponse, data, rpcRequest)”
});
}
})

function Myshow(rpcResponse, data, rpcRequest)
{
isc.say('ResponseString: ’ + data);
}