[EMAIL PROTECTED] wrote:
> I know this issue has been raised before, but I can't find it in the
> archives.
>
> I have a page that does quite a lot of database processing. I want to
> show the user a "Please Wait" message while processing and before the user
> is redirected to a "Thank You" screen after the processing is
> complete. I've tried a response.write before starting the processing
> without success.
>
> Any thoughts or suggestions that might work in this situation?
this is how I would do it..
Response.Write("Saving...\r\n");
Response.Flush();
//process
Response.Write("" +
"<"+"script>\r\n" +
"window.location.replace('saved.asp');\r\n"+
"<"+"/script>\r\n");
Response.End();
Sorry for the JS, I've been doing a LOT of JS and PHP lately.. <g>
Basically, make SURE that you Flush the buffer to the browser, (NOTE)
if you need to redirect do it as above.. write out a script tag, with
a window.location.replace() this is effectively the same as a redirect
in asp. it will take the current location out of the history buffer,
and replace it with the page.. you can pass a querystring that can
contain an id, for showing a final page..
Other than that, some tricky use of dhtml will also work. this is just
a simple example. :)
I actually use a method for this in php... same can be done in asp.. :)
if VBScript, will need to use two functions.. I do script checking before
the user logs onto the site, so I can safely rely on scripting.
NOTE: mozilla (and presumably nn6-7) allow a user to dissable "unwanted
windows".. unfortunately, this ALSO dissables alert/dialog boxes, so,
you may want to work around this. :)
function redirect($url,$msg=false) {
ob_clean();
if ($msg) {
$message = rawurlencode($msg);
print("
<script language='JavaScript'>
alert(unescape('$message'));
window.location.replace('$url');
</script>
");
}else{
print("
<script language='JavaScript'>
window.location.replace('$url');
</script>
");
}
flush();
exit();
}
--
-----------------------------------------------------------------------
Michael J. Ryan | ICQ: 4935386
tracker1(at)theroughnecks(dot)com | AIM/AOL: azTracker1
Roughneck BBS: | Yahoo: azTracker1
http://www.theroughnecks.net | MSN: (email address)
telnet://theroughnecks.net | Trillian: www.trillian.cc
---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]