[Zope] ending a chunked http stream

Thomas B. Passin tpassin@mitretek.org
Wed, 6 Feb 2002 16:19:27 -0500


[seb bacon]


> I'm writing some things in a stream to the browser, to keep the user
> informed that stuff is happening while a long-winded process unfolds.
>
> When that process has ended, I want to publish a DTML template as a new
> page.  How can I end the HTTP stream and start a new one?
>
>      def someFunction(self, REQUEST):
>         response = REQUEST.RESPONSE
>         # do something longwinded
>         response.write("please wait")
>         # do something else longwinded
>
>         # now I want the following DTML Method to get displayed
>         return self._report_template(self, REQUEST)
>

I like to do this using frames in the browser.  I use javascript in the
dispatching page in one frame - or it could be in the frameset - and the
longwinded report will display in another frame.  Before submitting the
form, I use javascript to write a message (e.g., "Please Wait...") to the
display frame.  The message will stay there until the display frame reloads
with the longwinded page.

Works like a charm, although of course the client browser has to use
javascript.

Cheers,

Tom P