Welcome Guest, Not a member yet? Register   Sign In
Display interim, processing-intensive page ASAP
#2

[eluser]bubbafoley[/eluser]
You're actually going to need 4 pages. The new page (Page-A1) will just do the processing and not show any output. Page-B needs to check if processing has been done already and if not use cUrl with a timeout of 1 second to kick off the processing asynchronously, then go to Page-C if processing is complete otherwise show Page-B. Then set Page-B to refresh itself every 2 or 3 seconds.

It would work something like this:

Page-A:
=====================================
set session variable "processed"=FALSE
redirect to Page-B

Page-A1:
=====================================
do processing
set session variable "processed"=TRUE
set session variable "processing"=FALSE

Page-B:
======================================
if ( ! "processed" AND ! "processing")
{
set session variable "processing"=TRUE
cUrl(Page-A1, timeout = 1 sec)

}
elseif ( "processed" )
{
redirect to Page-C
}
show_waiting_page(refresh = 3 sec)


Page-C
======================================
Ta-Da


Messages In This Thread
Display interim, processing-intensive page ASAP - by El Forum - 02-24-2011, 06:18 PM
Display interim, processing-intensive page ASAP - by El Forum - 02-24-2011, 09:06 PM
Display interim, processing-intensive page ASAP - by El Forum - 02-27-2011, 04:06 PM
Display interim, processing-intensive page ASAP - by El Forum - 02-28-2011, 07:39 AM
Display interim, processing-intensive page ASAP - by El Forum - 02-28-2011, 10:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB