473,224 Members | 1,382 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,224 software developers and data experts.

Wondering about a search page!

I have noticed that one like mysql.com when you do a search it takes
you to a page that says your search is running then it loads up the
results on another page. How can I do this. I figured it would help
for any query that might take more than a couple seconds to have time
to run.

Oct 26 '06 #1
4 1567
Extremest wrote:
I have noticed that one like mysql.com when you do a search it takes
you to a page that says your search is running then it loads up the
results on another page. How can I do this. I figured it would help
for any query that might take more than a couple seconds to have time
to run.
i,

Are you talking about multiple windows (frames, Iframes, popupwindows) or
all in the same window?

If the former, use JavaScript to load an URL in some window. Or if you just
want to change one window that is different from the one where the click
happens, simple use the word target="windowname" in your hyperlink where
windowname is name of the window where you want to new page to be loaded.

If the latter, are we talking about a sign saying 'Just a few secs...' and
then loads the page in the same window?

I checked www.mysql.com but I didn't see the behaviour you mention, so be
more precice please. :-)

Regards,
Erwin Moller
Oct 26 '06 #2
I'm sorry I mean all on one page. Here is the forum for mysql that i
am talking about. If you put something in the search at the top there
it will do what I am talking about.
http://forums.mysql.com/

Oct 26 '06 #3
Extremest wrote:
I'm sorry I mean all on one page. Here is the forum for mysql that i
am talking about. If you put something in the search at the top there
it will do what I am talking about.
http://forums.mysql.com/
Hi,

Hmm, I still don't see it happen. :-/
Everything happens at once when I search.

Anyway,
You have a long process and want to say 'stand by please....' to your
visitor in the meantime. Right?
AFAIK the only way to do this (nicely) via JavaScript, which can be
disabled.
At the bottom I propose a way that is less nice to see, but works even if JS
is disabled.

** If you know your visitor has JS enabled **

1) Before you start the long process, send a partial HTML file to the
client. call ob_start() before you create output. This starts the buffering
of the output.
eg:
<headerstuff and doctype here>
<body onLoad="showPage();">
<div id="pleasewait" style="display:block">
<h1>Please wait, I am very busy</h1>
</div>

<div id="realpage" style="display:none">

2) Call ob_flush(). This will make sure (sort of) that the content created
so far is send to the visitor.
--Start your processing here and produce output as you want to. <--
3) End with:

</div>

<script type="text/javascript">
function showPage(){
// make pleasewait invisible
document.getElementById("pleasewait").style.displa y='none';
// make realpage visible
document.getElementById("pleasewait").style.displa y='block';
}
</script>

</body>
</html>

Not tested, so forgive typos, but that is the idea.
Only use this solution is you are sure your visitor has JS enabled,
otherwise they will be stuck with 'pleasewait' untill their power runs out.

** No JS **
A more reliable way, that does not depend on JS being enabled is simple, but
less elegant because the pleasewait will never disappear. Like this:
1) Call ob_start()
<headerstuff and doctype here>
<body>
<h1>Please wait, I am very busy</h1>

2) Call ob_flush()
3) do calcs and produce output.
Regards,
Erwin Moller
Oct 26 '06 #4
I did notice that the normal search at mysql does not do it only the
forum search does it for me.

I will see what I can do with what you have givin me though...Thanks a
lot for the help.

Oct 27 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: R. Rajesh Jeba Anbiah | last post by:
Q: Is PHP search engine friendly? Q: Will search engine spiders crawl my PHP pages? A: Spiders should crawl anything provided they're accessible. Since, nowadays most of the websites are been...
1
by: Les Juby | last post by:
A year or two back I needed a search script to scan thru HTML files on a client site. Usual sorta thing. A quick search turned up a neat script that provided great search results. It was fast,...
2
by: CharitiesOnline | last post by:
Hello, I have set this script up to add paging to a search results page. Which on the first page works fine. I calculates how many pages there should be depending on the number of results returned...
5
by: George | last post by:
Hi, Anyone has the background for explaining? I have made a search on my name and I have got a link to another search engine. The link's title was the search phrase for the other search engine...
1
by: suresh | last post by:
Hi! Guys, I am using a base class and I am inheriting it into derived class page instead of using System.Web.UI.Page. which is giving the following error. "The file could not be loaded into...
4
by: MDW | last post by:
Posted this on another board, but evidently it was off-topic there...hope you folks will be able to provide some guidance. I've been working on a Web site for a business (my first non-personal...
4
by: bendlam | last post by:
I have a page that contains search criteria and when you click on the search button it causes a post back that populates a dataview on the same page. One of the gridview columns contains a link...
1
Merlin1857
by: Merlin1857 | last post by:
How to search multiple fields using ASP A major issue for me when I first started writing in VB Script was constructing the ability to search a table using multiple field input from a form and...
13
by: jfarthing | last post by:
Hi everyone! I am using the script below to search a db. If the is more than one match in the db, all goes well. But if there is only one match in the db, nothing gets displayed. Any...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.