Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I get my PHP script to load after jQuery UI tabs?
    primarykey
    data
    text
    <p>Surprisingly I cannot find anyone else having this issue, which means I am doing something wrong. From what I understand, PHP is read first, by the browser, correct?</p> <p>I am using jQuery UI to display a tabbed view, like so:</p> <pre><code>&lt;script&gt; $(function() { $("#tabs").tabs(); }); &lt;/script&gt; </code></pre> <p>Very simple... Inside of the tabbed view I have a lengthy bit of PHP code that grabs the system status information from a server and displays this information inside of one of the tabs, called 'system status', like so:</p> <pre><code> &lt;div id="tabs"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="#tabs-1"&gt;System Status&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;div id="tabs-1"&gt; &lt;?php //Lengthy PHP script ?&gt; &lt;/div&gt; </code></pre> <p>Normally PHP loads so fast that you cannot tell that the PHP is being loaded before the jQuery UI tab is being loaded. In this case, you will see some text being displayed as the browser loads the PHP script and fetches server-side info before the UI is loaded and it causes my GUI to look really nasty.</p> <p>I have googled this issue and cannot figure out how to simply force the jQuery to code to execute BEFORE the PHP code, so that you will see my nice tabbed UI first while the PHP code executes within it. Any help or point in the right direction would be great. Oh, and I am also great at getting schooled and slapped in the face with hard computer science if I am completely missing something important here. Thank you.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload