There can be two options with the "please wait" trick:
1) You show a page with the "Please wait" message, then you redirect to the final page
2) You make one page with DHTML.
I did the second trick in PHP, but the language doesn't matter here. The idea is the following:
First you output the beginning of your page and finish thi spart with e.g.

<script language="vbscript">
document.body.style.cursor="wait"
document.write "<div id=dvStatus style='color:red;font-weight:700'>Loading...<br>Please wait!<br></div>"
</script>
<script language='JavaScript'>

It may be useful to *flush* the output at this point, but all seems to work w/o flush. I don't
know if Ruby's CGI buffers its output. If so, you need to switch it off or to flush the output
explicitly. Then you do your looooooong stuff: calculate 1_000_000 digits of Pi, generate
fractal pictures, print long tables to your page, whatever. When done, you output this:

<script language="VBScript">
document.body.style.cursor="default"
dvStatus.style.display="none"
</script>

and then you can print some your final stuff and finish with </body></html> :)
It all requires vbscript and IE at the client's site only if you want to show a hour-glass
cursor. If you don't care about the cursor, you can remove the lines relating to it and
switch to JavaScript. Then it could work for Netscape/Opera/etc too, although you
should probably change line [dvStatus.style.display="none"] too.

HTH,
Georgy

"Milo Thurston" <nospam / linacreschoolofdefence.org> wrote in message news:c9mr3p$t6e$1 / news.ox.ac.uk...
| Apologies for the many CGI posts.
|
| Anyway, I am attempting to set up a script that runs blast jobs,
| these take some time, so a "pease wait" message whilst they are running
| followed displaying the results would be good.
| There are suggestiong here:
| http://www.daimi.au.dk/~mailund/css/cgi-ui-ex.html
| http://tech.irt.org/articles/js172/#io_buffering
| ...but these are for Perl.
|
| At present, I have something like:
|
| def results(genome)
| if genome.empty?
| # display the "please select a genome to search" message
| else
| # show a please wait message
| results = run_job(genome)
| if results.empty?
| # print "nothing found" message
| else
| # print results
| end
| end
| end
|
| cgi.out do
| cgi.html do
| cgi.body {
| header +
| submit_buttons +
| results(genome) +
| footer
| }
| end
| end
|
| This runs but does not (of course) display the "please wait" part.
| Are there any sites similar to the above giving Ruby examples?
| Thanks.
|
| -- 
| www.sirwilliamhope.org