[eluser]crumpet[/eluser]
Hi, I am trying to create a product view page with tabs for comments, related products, etc. I want these tabs to load through ajax when you click the buttons. My first instinct was to have ajax post to a seperate function for each tab and have that function reply with a view file which the js displays. I can't seem to get this to work with json.
Code:
$return['view'] = $this->load->view('front/modules/resources/resource_view/additional/comments');
echo json_encode($return);
ends up as this :
Code:
{"view":null}whats up
where "whats up" is what is in the view file. I'm guessing this is becuase its to big. Is there a way around this or is the best practise to have php only send the variables and make js format the data into a view.
Thanks