Monday, May 9, 2005

Howdy!

I've got a form that the user submits, after which the database needs to do
a bunch of things. Depending on the load, etc., it's possible this may take
some time to perform. So, I'd like to put up a "please wait" screen for the
user to look at (rather than having them press the SUBMIT button 20 times...
:-).

I do understand the mechanics of it; you post the form to the "please wait"
page, then from there redirect to the final "confirmation" page where all
the action takes place. I've managed to set this up and it works OK for me.

My question is there appears to be several ways to go about this. What looks
to be the most simple would be using the following meta tag in the <HEAD>
section of the "please wait" page:

<meta http-equiv="refresh" content="1;URL=http://www.site.com/confirm.a4d";>

which bounces you merrily along to the "confirm" page. (I used a relative
link and this seemed to work OK, too.)

Another would be using JavaScript on the "please wait" page:

<script type="text/javascript">
function redirect()
{
 { window.location.href="http://www.site.com/confirm.a4d";; }
}
</script>

and in the BODY tag the following code:

<body onLoad="redirect();">

(I'm not a JavaScript expert; I just lifted this from some other page I
found on the net. Perhaps there's a better way? This does seem to work OK.)

My main question, however: is there a preference in doing this that works
better than others? In my very limited testing, both seemed to work fine,
but perhaps you experts out there have some advice on this?

Or is there even some other method that works better?

(I realize some people may turn off JavaScript, but tough for them... :-)

Many thanks!

Michael Larue

_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Reply via email to