Topic: Call registered function from registered function (LoadCommand)

Hi everybody.
i've got couple of .php file with some xajax functions inside. i use to have a file with functions, (xajaxServer01.php,xajaxServer02.php, xajaxServer03.php....) and a file with function registration (xajaxCommon01.php,xajaxCommon02.php,xajaxCommon03.php...).
I need to use in the same project some functions coming from different xajaxServerXX.php files. i tried something like:

function colle(){
    include("COLLE_XajaxServer.php"); // <<<<<< ------    here's declared situazioni() function
    $objResponse = new xajaxResponse();
    $objResponse->loadCommands(situazioni());   
    return $objResponse;
}

but it returns this error:
"ERROR: No response processor is available to process the response from the server"
is there a way to get it to work?

Thank you very much,
Daniele.

Re: Call registered function from registered function (LoadCommand)

Hi,

in 0.6 the loadCommands has been replaced with:
appendResponse($mCommands, $bBefore=false)

If you ever stop learning you may as well dig a hole, crawl in and pull the top over yourself.

Re: Call registered function from registered function (LoadCommand)

yes, that's right. I havn't tried .6 version because i use compiled version (xajaxAIO.inc.php).
By now i've merged all files within a single big-big file. Now it's debug time hmm
Thanks,
daniele.

Re: Call registered function from registered function (LoadCommand)

Could you post the COLLE_XajaxServer.php file?

If you ever stop learning you may as well dig a hole, crawl in and pull the top over yourself.

Re: Call registered function from registered function (LoadCommand)

here is an extract of colle_xajaxserver.php:

function situazioni(){
    $fntSmall="<font face=arial size=-1>";
    include("../../imports/Config.inc.php");
    $objResponse = new xajaxResponse();
...
...
...
...
...
    $ris .= "</table>";
    $objResponse->script("javascript:Tab(\"\",\"elenco\");");
    $objResponse->script("javascript:Tab(\"$ris\",\"situazioni\");"); 
    $objResponse->script("javascript:Tab(\"\",\"dettaglio\");");
    return $objResponse;   
}

require ("COLLE_XajaxCommon.php");
$xajax->processRequest();

As a "stand-alone" it works perfectly.
thanks,
Daniele

Re: Call registered function from registered function (LoadCommand)

Well that code looks ok to me.

Have you tried turning on the xajax debugging to see just what is being returned from the server?

$xajax->configure('debug',true);

If you ever stop learning you may as well dig a hole, crawl in and pull the top over yourself.

Re: Call registered function from registered function (LoadCommand)

yep, usually i use
$xajax->setFlag('debug',true);
to get debug messages, and what I got was:

"ERROR: No response processor is available to process the response from the server"

Re: Call registered function from registered function (LoadCommand)

Was there anything before that?

Debug says Received: followed by how mant bytes and the bytes received.

Maybe post the whole debug message...

If you ever stop learning you may as well dig a hole, crawl in and pull the top over yourself.