Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You said you didn't want to do this in AJAX. While AJAX is great for this, there is a way to show one DIV while waiting for the entire <code>&lt;body&gt;</code> to load. It goes something like this:</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;style media="screen" type="text/css"&gt; .layer1_class { position: absolute; z-index: 1; top: 100px; left: 0px; visibility: visible; } .layer2_class { position: absolute; z-index: 2; top: 10px; left: 10px; visibility: hidden } &lt;/style&gt; &lt;script&gt; function downLoad(){ if (document.all){ document.all["layer1"].style.visibility="hidden"; document.all["layer2"].style.visibility="visible"; } else if (document.getElementById){ node = document.getElementById("layer1").style.visibility='hidden'; node = document.getElementById("layer2").style.visibility='visible'; } } &lt;/script&gt; &lt;/head&gt; &lt;body onload="downLoad()"&gt; &lt;div id="layer1" class="layer1_class"&gt; &lt;table width="100%"&gt; &lt;tr&gt; &lt;td align="center"&gt;&lt;strong&gt;&lt;em&gt;Please wait while this page is loading...&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; &lt;div id="layer2" class="layer2_class"&gt; &lt;script type="text/javascript"&gt; alert('Just holding things up here. While you are reading this, the body of the page is not loading and the onload event is being delayed'); &lt;/script&gt; Final content. &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>The onload event won't fire until all of the page has loaded. So the layer2 <code>&lt;DIV&gt;</code> won't be displayed until the page has finished loading, after which onload will fire.</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.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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