Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Processing pages in background 1

Status
Not open for further replies.

timmyb

Programmer
Feb 12, 2001
2
GB
Hi all,

I have an intensive data-import process written in CFML, which is triggered by a link on a web page. I would like the web browser to display a progress notification or 'please wait' message while the process is running. The process is taking several hours. Any ideas?

timmyb
 
Hey Timmy,

You can create a global variable such as an application or server variable that contains the current status. Inside the data processing script, you can set the variable at various point to indicate the current status of the process. I've done this before in a similar situation and I did something like this:

<cfset application.status = &quot;Starting&quot;>
...... More code .....
<cfset application.status = &quot;Processing data for #jobID#&quot;>
.... More code ...
<cfset application.status = &quot;Writing Log Information&quot;>
...
<cfset application.status = &quot;Complete&quot;>

On your status page, you can just check to see if the application.status is &quot;complete&quot; and display a please wait message if not. You can also display the current status so the users can visibly see the process working. This can also help for debugging if the process dies or gets hung.

Hope this helps,
GJ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top