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) seb
How about using a Location: header to cause the browser to reload the page?
From: seb bacon <seb@jamkit.com> Date: 05 Feb 2002 15:27:57 +0000 To: zope@zope.org Subject: [Zope] ending a chunked http stream
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)
seb
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[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
participants (3)
-
marc lindahl -
seb bacon -
Thomas B. Passin