Jump to content

Loading Graphic while executing


envexlabs

Recommended Posts

Not really PHP at all but here:

 

<script language="javascript" type="text/javascript">

document.write('<div style="width: 100%; text-align:center;"><img src="loading.gif"></div>');

function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}

addLoadEvent(function() {
  document.getElementById("loading").style.display="none";
});


</script>

Get some nice loading.gif images at:

http://www.ajaxload.info

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.