![]() |
problem when trying to access a controller function from view using Cjax methods - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: problem when trying to access a controller function from view using Cjax methods (/showthread.php?tid=53904) |
problem when trying to access a controller function from view using Cjax methods - El Forum - 08-13-2012 [eluser]mad82[/eluser] Hi, I got a problem when trying to access a controller function from a view using Cjax methods, its bit frustrating me, any help is greatly appreciated, Below is the code i used controller file code Code: class Gethint extends CI_Controller { Here is the View file Code: <?php problem when trying to access a controller function from view using Cjax methods - El Forum - 08-14-2012 [eluser]Ajaxboy[/eluser] What error are you getting? problem when trying to access a controller function from view using Cjax methods - El Forum - 08-14-2012 [eluser]Ajaxboy[/eluser] What I can see from here is that you are including file 'ajax.php', instead use 'ajaxfw.php' (For the CodeIgnater package). so instead of: Code: require_once "ajax.php"; use Code: require_once "ajaxfw.php"; cj problem when trying to access a controller function from view using Cjax methods - El Forum - 08-20-2012 [eluser]mad82[/eluser] Hi,Thanks for your suggestions, problem is rsolved. problem when trying to access a controller function from view using Cjax methods - El Forum - 08-20-2012 [eluser]CroNiX[/eluser] Was that a copy/paste? Because __construct() should have 2 underscores and you only have 1. |