Show page "loading" |
I have a SPA-type system that uses adminlte .css, in one method I load several SQL selects to create a page with several tabs of information. I would like to show a loading before assembling the page. I created a simple page to be set up before calling MODELS. But the page is not shown before, it is only shown after SELECT-SQL processing.
PHP Code: public function trazer_alunosdaturma($ncodtur=null) {
php can't work like that. for the "loader" you need to show HTML and then make a request to the controller where SQL (in response to JSON or html). Next, you insert tabs in the background and disable the loader
(11-03-2023, 07:27 AM)ozornick Wrote: php can't work like that. for the "loader" you need to show HTML and then make a request to the controller where SQL (in response to JSON or html). Next, you insert tabs in the background and disable the loader Thanks for the answer. Notice in the code I posted, I placed the html before loading the methods in the MODELS to show the loading page. But it did not work. PHP Code: //I tried to put it here
I can't tell you exactly what the error is. But the logic is this: Show the base page with the loader (for example, trazer_alunosdaturma()) after doing AJAX to trazer_alunosdaturma_data() and insert the data. If you don't see the commented template, find the error. In general, everything is correct.
And before die() you write $this->load->view('v_notasturmax',$dados); but $dados not installed (11-03-2023, 09:25 AM)ozornick Wrote: I can't tell you exactly what the error is. But the logic is this: Show the base page with the loader (for example, trazer_alunosdaturma()) after doing AJAX to trazer_alunosdaturma_data() and insert the data. If you don't see the commented template, find the error. In general, everything is correct. Yes yes, of course. This line is commented out during testing. https://youtu.be/P6g0i50Kxns Code: $this->load->view('includes/html_header');
Try sample template. Your loader template incorrect.
Code: <!DOCTYPE html> (11-03-2023, 11:28 AM)ozornick Wrote: Try sample template. Your loader template incorrect. Code: "Your loader template incorrect." |
Welcome Guest, Not a member yet? Register Sign In |