Bubbling events beyond the document boundary

We've just started developing a new sample for the Sidewinder Viewer which, among other things, demonstrates basic communication between a running script and the rendered document. The sample uses the Backpack web service, via its RESTful API, and is something that we shall continue to develop as the viewer becomes more powerful.
The script/document communication is event-based and relies on events bubbling from the document element to a conceptual parent that represents the renderer object itself. In the sample, the script handles events when you sign in to and exit from the application.
To use the sample, you'll need to install the latest versions of the Sidewinder Viewer and formsPlayer. You will also need to sign up for a Backpack account (it's free). To run the sample, the viewer must be invoked with the script path as the first argument. Alternatively, you can save the script to your local machine and use 'Open with...' from the Windows Explorer context menu. On running the script for the first time, you will be required to enter your Backpack API key; this can be viewed at the bottom of your 'Account' page on the Backpack website.

