The link above demonstrates the use of a dijit ContentPane to request content from the server with a client-side request refresh, and error detection that allows the server to indicate when the requests should be stopped.
The intended use is to allow graceful monitoring of background scripts on a server.
- Use the ContentPane to display the content. A quote script is used to illustrate the content change.
- Have the server-side code count and issue a 303 See Other when processing has completed. http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
- Have the client-side code catch the 303 and act accordingly. In this case, it changes the displayed text to reflect the status, puts up an alert box, and clears the timer.
Use View Source to view the client-side code, server-side code is listed at the bottom of the page.
This is a nice way to implement a refreshing iframe with dojo.