/    Sign up×
Community /Pin to ProfileBookmark

how to make a please wait page ?

Hi,

On my page, I have a search function in php. Sometimes, it can take some time to ouput and just hang … Therefore, I was wondering how to output a “search being processed” message on the screen (as found in many sites) and then output the result at once when ready. I just have no idea how it is done.

Anybody would could spare a minute to explain me would really help me out !

thanks in advance !!!

to post a comment
PHP

5 Comments(s)

Copy linkTweet thisAlerts:
@NogDogApr 13.2007 — You could display your "please wait" message, do a flush(), and then start your actual search process. (Caveat, some web servers may still buffer your output even after the flush(), so you'll have to try and see if it works in your situation.)
[code=php]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang='en'>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=ISO-8859-1'>
<title>Examle</title>
</head>
<body>
<p>Your request is being processed. This may take a minute or two.
Please do not re-load this page. Yadda yadda yadda....</p>
<?php
flush(); // send the above to the browser
// now do your search processing and output...
?>
</body>
</html>
[/code]
Copy linkTweet thisAlerts:
@patimagesauthorApr 13.2007 — sorry for the late reply but it did not work on my server ... Are there any other way or am I condemn to have this hanging page ?:mad:

thanks for your input !!!!!!!!!
Copy linkTweet thisAlerts:
@pcthugApr 13.2007 — The better question would be; Why is my search page so slow?

Please post your code.
Copy linkTweet thisAlerts:
@php_hazard_01Apr 13.2007 — hehe.....ajax dude!....ajax.....................

you should look for a code that gets the search stuff and let the search page wait for the query to load completely and then echo it out.....


im not sure.,.but i think, that would make your life easier...

im not an ajaxian myself, hate javascript..? XD

and why is your search page slow?...hmmmm
Copy linkTweet thisAlerts:
@patimagesauthorApr 13.2007 — why ? because it searches a lot for many :-D !

will look into ajax !

thanks!
×

Success!

Help @patimages spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...