in reply to server-parsed CGI output?

I think you're pretty much out of luck there.
I have done this trick in the past:
Create a SHTML file that includes your program.
Make sure all your <form> tags point to the SHTML file, and use GET.
<html> .... <!--#include virtual="foo.cgi?${QUERY_STRING}" --> .... </html>
This will ensure that you get the "wrapper" effect from the SHTML file, as well as form processing and/or dynamic output from your CGI program.
Enjoy!
--
Casey
   I am a superhero.