0

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

3
Contributors
4
Replies
5
Views
5 Years
Discussion Span
Last Post by diafol
0

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.

0

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

1

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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.