I think I've found what caused my problem and you where true, the echo wasn't the problem.
I don't know why (maybe a copy/paste error between two projects I'm working on), but after my "echo" there was a "die();"... now it explains all ;-)

Sorry to have taken your time away. Rest assured I will report anything (real) I'll found about your ExtDirect, because I'll use it extensively the next weeks in a project I'm starting right now.

Thanks a lot to have taken some time to help me, it definately gave me some advice on my problem !

New version - new features - coming soon!

Sorry to have taken your time away. Rest assured I will report anything (real) I'll found about your ExtDirect, because I'll use it extensively the next weeks in a project I'm starting right now.

Thanks a lot to have taken some time to help me, it definately gave me some advice on my problem !

No problem. In fact, I thank the opportunity to share here in the forums a bit more information about "ExtDirect.php" internals. Also, each post makes the thread stay on top of the latest updated!

I thought the cause of your problem could be also something related to the "header" command in ExtDirectController::output... but now you already found the real cause.

I am using this "ExtDirect.php" in a project I am developing right now. More features were recently added! So, soon I will upload a new version.

Basically, three new configuration options were added, all of callback type: "authorization_function", "transform_result_function", and "transform_response_function"

You will be able to specify an "authorization_function", where you can check the user permissions and return true or false accordingly, allowing the API call or not.

With the "transform_result_function", you can modify the result of the API method call after its execution, but before it is sent to the client-side.

Finally, with the "transform_response_function", you can modify the response structure. This allows to fire server-side events! But I am not using this feature for it. I am using it to send extra server side data together with the RPC result.

Great job J! I just implemented this as a test last night, and like it's simplicity.

One question though (which may or may not be specific to your code): I'm planning on using ExtJS's polling functionality soon - is there any way to pass a direct function into a polling provider (a bit like directFn for data stores)?

Hi,
One question about form data: I'm using a checkbox which submits the value "on" if it is selected. However, if it's not selected, nothing gets submitted, and the direct function doesn't seem to run at all. Here's the function being called:

Firebird() is a self-written routine to dump the output to firePHP and a debug file as well. As it's the first line in the function, I would expect it to run, but it doesn't, which implies the function is not running.

You must remember that the Ext.Direct calls are asynchronous which means you cannot count on the callback parameter being executed in a linear fashion like the rest of your function code. In your example the function executeHook() calls the Direct method which sets a callback, then it returns output, which is empty until the callback is called. Once the HTTP request initiated by the executeHooks() completes, it then calls your callback and sets the value of output but by then your initial function has returned. You will have to redesign your logic to handle this