PDA

View Full Version : processing code needed


gcapp
05-13-2003, 03:12 PM
I have a site search engine on my site and sometimes the search is a little lengthy, so I wanted to insert some code that would produce a sentence on the page that would say something like "processing the search" before the search results appear.

Does anyone know of the asp code for doing this??

Thanks,
Gary

raf
05-13-2003, 03:45 PM
I think that flushing the buffer would do it:
<% Response.Buffer = True %>
html header
<%
response.write("One moment. Your search is in progress.")
response.flush
your other stuff
or a redirect
%>
Probably best to redirect, and have the actual search in another page, which will replace the messagepage after the whole script is completed (by only flushing the buffer at the end of the page.

Of course, the message needs to be short and small (size of transferred package) to have an effect.