Double table loading

Double table loading

xfirebgxfirebg Posts: 13Questions: 3Answers: 0

Hello. I have an question. How can i hide the first loading of table aka html? I want only to see the javascript one.
Im using php to build the table.
Thanks

Answers

  • allanallan Posts: 63,471Questions: 1Answers: 10,467 Site admin

    The best way is to load the data via Ajax. Then the HTML will be loaded and the initial Javascript executed very quickly (you are unlikely to see the unenhanced table). This is assuming that the table is being DOM loaded at the moment - but its hard to know without a link to a page showing the issue.

    Allan

  • xfirebgxfirebg Posts: 13Questions: 3Answers: 0

    Thanks for the reply. The website only loads in our LAN. Im requesting the data from PostgreSQL via PHP. I see that the data is must to be in json files. I think its not an option in my case?

  • allanallan Posts: 63,471Questions: 1Answers: 10,467 Site admin

    Just have your PHP script output JSON. PHP's json_encode() function will help with that.

    Allan

This discussion has been closed.