Welcome Guest, Not a member yet? Register   Sign In
sending json using $this->output-set_output()
#2

[eluser]CroNiX[/eluser]
If I'm understanding you, you can't just send something "to" jQuery. jQuery can make a request and have the server respond with some result which you can receive in the callback event of the $.get() request.

Code:
$.get(
  'http://yoursite.com/some_controller/some_method',  //Url making request to
  function(data) {  //callback function
    console.log(data);  //data would be your json sent back from the controller
  }
);


Messages In This Thread
sending json using $this->output-set_output() - by El Forum - 06-20-2012, 06:14 PM
sending json using $this->output-set_output() - by El Forum - 06-20-2012, 07:53 PM
sending json using $this->output-set_output() - by El Forum - 06-20-2012, 09:04 PM
sending json using $this->output-set_output() - by El Forum - 06-20-2012, 09:15 PM
sending json using $this->output-set_output() - by El Forum - 06-20-2012, 10:50 PM



Theme © iAndrew 2016 - Forum software by © MyBB