Display word "Loading..." while waiting record to retrieve

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
little_girl
Forum Newbie
Posts: 20
Joined: Tue Oct 13, 2009 5:11 am

Display word "Loading..." while waiting record to retrieve

Post by little_girl »

I would like to know are there any way to display the word "Loading..." while waiting for records to be retrieve from the server.

Hope someone could give me some idea to do it. Thanks in advance.
Last edited by little_girl on Thu Oct 15, 2009 3:22 am, edited 1 time in total.
dejvos
Forum Contributor
Posts: 122
Joined: Tue Mar 10, 2009 8:40 am

Re: Display word "Loading..." while waiting page to load

Post by dejvos »

One way:
Throught Javascript. You wil put a div with a word "Loading" on top of all layers and after loading of page ( when event "load" occures) hide the top div.
little_girl
Forum Newbie
Posts: 20
Joined: Tue Oct 13, 2009 5:11 am

Re: Display word "Loading..." while waiting page to load

Post by little_girl »

Sorry..I have given the wrong information. I have modified my post. Actually what I want is display word "Loading..." while waiting for records to be retrieve from server, not waiting for page to load. Can you give me some idea on how to use javascript to do that? Thanks.
Last edited by little_girl on Thu Oct 15, 2009 3:24 am, edited 1 time in total.
guosheng1987
Forum Newbie
Posts: 24
Joined: Thu Oct 15, 2009 3:03 am

Re: Display word "Loading..." while waiting page to load

Post by guosheng1987 »

dejvos wrote:One way:
Throught Javascript. You wil put a div with a word "Loading" on top of all layers and after loading of page ( when event "load" occures) hide the top div.
little_girl
Forum Newbie
Posts: 20
Joined: Tue Oct 13, 2009 5:11 am

Re: Display word "Loading..." while waiting record to retrieve

Post by little_girl »

I have done that using javascript to display the word "Loading"...but how about when waiting for the records retrieve from the server? I have used more the one query in my php to retrieve records, so when I want to display rercords it was very slow. That's why I want to display "Loading" so that user will know something is running at the back.
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: Display word "Loading..." while waiting record to retrieve

Post by jackpf »

Either through AJAX, or output buffering. Or maybe a redirect.
little_girl
Forum Newbie
Posts: 20
Joined: Tue Oct 13, 2009 5:11 am

Re: Display word "Loading..." while waiting record to retrieve

Post by little_girl »

Can you give me some idea on how to do that? Or where can I get some tutorials about that? Thanks.
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: Display word "Loading..." while waiting record to retrieve

Post by jackpf »

Google has plenty :)
little_girl
Forum Newbie
Posts: 20
Joined: Tue Oct 13, 2009 5:11 am

Re: Display word "Loading..." while waiting record to retrieve

Post by little_girl »

I have found the solution. Thanks.
Post Reply