Page 1 of 1

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

Posted: Wed Oct 14, 2009 11:16 pm
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.

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

Posted: Thu Oct 15, 2009 2:23 am
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.

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

Posted: Thu Oct 15, 2009 2:53 am
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.

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

Posted: Thu Oct 15, 2009 3:18 am
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.

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

Posted: Thu Oct 15, 2009 3:28 am
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.

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

Posted: Thu Oct 15, 2009 3:29 am
by jackpf
Either through AJAX, or output buffering. Or maybe a redirect.

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

Posted: Thu Oct 15, 2009 3:58 am
by little_girl
Can you give me some idea on how to do that? Or where can I get some tutorials about that? Thanks.

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

Posted: Thu Oct 15, 2009 4:03 am
by jackpf
Google has plenty :)

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

Posted: Thu Oct 15, 2009 4:12 am
by little_girl
I have found the solution. Thanks.