Welcome Guest, Not a member yet? Register   Sign In
calling the right method after ajax call
#7

[eluser]pistolPete[/eluser]
I assume that your third uri-segment really contains the functions names, then you can use something like that:
Code:
function delete_images($imageIds)
    {
        deleteImages();
        $function = $this->uri->segment(3);
        $html = $this->$function(params...);
        // return ajax response
        return $html;
    }

Have a look at Variable functions.


Messages In This Thread
calling the right method after ajax call - by El Forum - 02-15-2009, 05:28 AM
calling the right method after ajax call - by El Forum - 02-15-2009, 05:31 AM
calling the right method after ajax call - by El Forum - 02-15-2009, 05:53 AM
calling the right method after ajax call - by El Forum - 02-15-2009, 06:22 AM
calling the right method after ajax call - by El Forum - 02-15-2009, 06:23 AM
calling the right method after ajax call - by El Forum - 02-15-2009, 06:43 AM
calling the right method after ajax call - by El Forum - 02-15-2009, 06:57 AM
calling the right method after ajax call - by El Forum - 02-15-2009, 07:00 AM
calling the right method after ajax call - by El Forum - 02-15-2009, 07:24 AM
calling the right method after ajax call - by El Forum - 02-15-2009, 07:33 AM
calling the right method after ajax call - by El Forum - 02-16-2009, 05:52 AM
calling the right method after ajax call - by El Forum - 02-16-2009, 06:25 AM
calling the right method after ajax call - by El Forum - 02-16-2009, 06:35 AM



Theme © iAndrew 2016 - Forum software by © MyBB