Answer the question
In order to leave comments, you need to log in
How to update view in CodeIgniter?
Good evening.
Is it possible to somehow load the desired view if it is located between other views (for example, header and footer), without reloading them?
For example, like here (reload view('posts/view' without touching the rest):
if($this->form_validation->run() === FALSE){
$this->load->view('templates/header');
$this->load->view('posts/view', $data);
$this->load->view('templates/footer');
}
Answer the question
In order to leave comments, you need to log in
If you only send an AJAX request to the server using jQuery, for example, and change the necessary data on the page through working with the HTML DOM tree.
That is, we have already sent a request to the server and received in response the page that the browser displayed, in order to receive new data, we need to send a new request to the server.
To better understand, you can read more about how the HTTP protocol works:
HTTP: a protocol that every developer should know
In simple terms about HTTP
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question