Rank: Newbie Groups: Member
Joined: 2/19/2010 Posts: 3
|
I have an operation that runs in ProgressBar RunTask. The operation can be successful or unsuccessful, in addition to being stopped by hitting the OnStop button.
At teh end of a successful process I want to redorect to anotehr page. If I try to redirect in the RunTask event then I get an error: "Cannot redirect after HTTP headers have been sent.", which makes sense.
I have the following client side script setup to handle the progress bar events:
@"<script> function OnProgress(progressBar) { var extraData = progressBar.getExtraData(); if (extraData) { var div = document.getElementById('divStatus'); div.innerHTML = extraData;
var imp = document.getElementById('divImporting'); imp.innerHTML = 'Importing...';
} }
function OnStop(progressBar) { var imp = document.getElementById('divImporting'); imp.innerHTML = ''; }
</script>"
So I'm assuming that I need to do the redirect here, but I have paramerts that need to come from within the RunTask event.
In this case this is an import process and a key is returned and I want to use that key in the redirect. #1) I'm not sure how I would pass that key to the client side script in this case. And #2) I only want this to happen is the process is successful, so does this only run when progress hits 100%, or if it is stopped part way through, either due to a cancel or an error, does this stop function still get called?
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
We do not provide free tech support for our free controls. You can either purchase a license for any of our product to receive support on all controls (including free controls) or pay per ticket if you do not wish to purchase a license. Please let us know if you would be interested in any of these options.
Thanks!
|
Rank: Member Groups: Member
Joined: 3/31/2010 Posts: 11
|
Valentech, did you ever come up with a solution. I need to do something very similar in that after the process has finished I need to display the results. I'll be purchasing a license in 2 weeks time so may try for support then if need be.
|