Start New Discussion within our Web Development Community

I am new to php...I wanna to show a loading image when the page is loading something in php...any help would be appreciated

I agree with Ardav, PHP (server side scripting) will usually load and complete before an image could be seen on a page. js on the other hand is on the front side, and can start loading at the body tag as the page is loading.

<body onload="displayLoading()">

It has to do with the order in which a web page is called.
http request -> serverside script runs & completes -> sends info to client -> client side code runs and completes.

I agree with Ardav, PHP (server side scripting) will usually load and complete before an image could be seen on a page. js on the other hand is on the front side, and can start loading at the body tag as the page is loading.

<body onload="displayLoading()">

It has to do with the order in which a web page is called.
http request -> serverside script runs & completes -> sends info to client -> client side code runs and completes.

can u please elaborate it..What is the function used on onload

Why don't you go over to the javascript forum? Or, do some reseaarch on js page load etc yourself?

This article has been dead for over six months. Start a new discussion instead.