One way around would be to call another cgi file from the existing Approve/Reject window, and perform all what you want to do there. In this way, you can avoid the next cgi task.