controller functions that are only accessible to jquery or ajax |
[eluser]xeroblast[/eluser]
as i was reading this thread : http://ellislab.com/forums/viewthread/229428/ .. a question pops in my mind.. if making function in controller to be private and not be accessible in the URL. is there a way to send data via ajax and its URL is not accessible by the browser but only ajax? i tried making a private function but ajax cant send the data to the URL i give.
[eluser]Mirge[/eluser]
Keep your function accessible so that you can query it via AJAX, and in the controller itself, test if it's an ajax call via is_ajax_request(). See manual here, very bottom: http://ellislab.com/codeigniter/user-gui...input.html An example might be something like: Code: public function get_cities()
|
Welcome Guest, Not a member yet? Register Sign In |