CodeIgniter Forums
TinyAjax callback function - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: TinyAjax callback function (/thread-2747.html)

TinyAjax callback function - El Forum - 08-22-2007

In TinyAjax (library for CI) you can set a callback function like this:


reload is the callback function, and it works. But when I pass the function variables through javascript, like this:


and in [removed]


the callback function doesn't work anymore (the delete_user php function works and the user is deleted, but the javascript callback function in not called)

Anyone has any idea? Is this a TinyAjax bug? I'm not experienced enough to debug it if it is, though

hope I'll be able to solve this problem

TinyAjax callback function - El Forum - 08-30-2007

Hey there, I just ran across this problem myself... went through the code and tracked down the problemo to this:

replace the $html = "......"; statement that starts on line 309 in /include/TinyAjax.php with this code snippet:

$html = " if({$func_name[0]}.arguments.length > 0) {
var y = {$func_name[0]}.arguments.length;
var arr = new Array(y+1);
for(var x = 0; x < y; x++) {
arr[x] = {$func_name[0]}.arguments[x];
arr[y] = {$func_name[2]};
return aj_call(\"{$func_name[0]}\", arr, true );\n\t\t\t}\n\n";