Welcome Guest, Not a member yet? Register   Sign In
is any global way pass session vars to views or THE ONLY WAY IS when pass vars to vie
#4

(This post was last modified: 01-31-2018, 08:22 AM by dave friend.)

(01-31-2018, 06:43 AM)lsepolis123 Wrote: in what page of manual exist more info about codeigniter json requests????

Other than the input class method is_ajax_request() (Docs HERE) there really isn't any.

There isn't much you need to know other than the URL from the JavaScript should point to a controller/method. That controller/method needs to  echo back the kind of data that was defined in the ajax call. If that data is JSON then usually a call to json_encode($data); happens somewhere along the line.

There are lots of examples out in the wild on how to "do" AJAX with CI.

One library that I found very useful is ThingEngineer/Codeigniter-jQuery-Ajax.
Reply


Messages In This Thread
RE: is any global way pass session vars to views or THE ONLY WAY IS when pass vars to vie - by dave friend - 01-31-2018, 08:14 AM



Theme © iAndrew 2016 - Forum software by © MyBB