0

In Codeigniter, I'm calling a view from a controller by

$this->load->view('results/displayTrends_Child', $data, TRUE);

I get a blank page. However, if I call by using displayView, it loads (though with unwanted headers and footers from the rest of the application).

What's the solution to this ? (I'm pretty sure its not HTML).

1
  • The code you are using for loading view will not output the view as you have set the third parameter to true.Try without adding TRUE and it will work. Commented Sep 5, 2014 at 14:17

2 Answers 2

3

There is a third optional parameter lets you change the behavior of the function so that it returns data as a string rather than sending it to your browser. This can be useful if you want to process the data in some way. If you set the parameter to true (boolean) it will return data. The default behavior is false, which sends it to your browser.

Try without the TRUE as the third parameter.

Sign up to request clarification or add additional context in comments.

Comments

0

Well, FALSE must be added as the last parameter. In addition to that, the issue was that in the view, the file jquery-1.11.0.min.js was not included. This js file is needed throughout the application.

How it worked is still not clear. Must be something in the js file.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.