1,105,232 Community Members

Search loading in a page

Member Avatar
bavenbabu
Junior Poster in Training
60 posts since Feb 2012
Reputation Points: -6 [?]
Q&As Helped to Solve: 1 [?]
Skill Endorsements: 0 [?]
 
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

Member Avatar
diafol
Where are my eyes?
12,970 posts since Oct 2006
Reputation Points: 1,821 [?]
Q&As Helped to Solve: 1,847 [?]
Skill Endorsements: 92 [?]
Moderator
Featured
Sponsor
 
0
 

You'll need to use js. Probably.

Member Avatar
NinjaMediaD
Light Poster
44 posts since Sep 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 2 [?]
Skill Endorsements: 0 [?]
 
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.

Member Avatar
bavenbabu
Junior Poster in Training
60 posts since Feb 2012
Reputation Points: -6 [?]
Q&As Helped to Solve: 1 [?]
Skill Endorsements: 0 [?]
 
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

Member Avatar
diafol
Where are my eyes?
12,970 posts since Oct 2006
Reputation Points: 1,821 [?]
Q&As Helped to Solve: 1,847 [?]
Skill Endorsements: 92 [?]
Moderator
Featured
Sponsor
 
1
 

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

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article