Gadget to Gadget. This document explains how to use the publish-subscribe ("pubsub") framework to pass messages from one gadget to another.
This feature is deprecated and is unsupported. The publish-subscribe framework allows publisher gadgets on iGoogle to communicate changes to subscriber gadgets that have declared interest in those changes. Note: You can use the publish-subscribe framework for type="html" gadgets. This feature does not support type="url" gadgets. To use pubsub, your gadgets must be running on iGoogle. Here are the major concepts involved in gadget-to-gadget communication: Publisher. This table lists the channel names that are currently supported. You implement gadget-to-gadget communication through "userprefs binding". The above snippet illustrates how to define userprefs for the pubsub feature: The publisher gadget and the subscriber gadget must have at least one userpref with the same name.
Step 1. Initially, each gadget displays its own default value for the userpref test000. Step 2. YouTube iframe API. Mapplets. IFrames - Cross-Domain Communication. An update in the era of HTML5 (May 6, 2011) This post has been heavily commented and linked to over the years, and continues to receive a ton of traffic, so I should make it clear that much of this is no longer relevant for modern browsers.
On the one hand, they have adjusted and tightened up their security policies, making some of the techniques here no longer relevant. On the other hand, they have introduced technologies that make it easier to do cross-domain communication in the first place. With modern browsers, you can and should be using postMessage for this purpose. Library support is now available too. Now back to the original post … (from March 31, 2008) This article explains iframe-to-iframe communication, when the iframes come from different domains. Background: Cross-Domain Communication Ironic that in this world of mashups and Ajax, it’s not very easy to do both of them together. Related to this article is a demo application and a couple of variants. The Demo Demo Ta-da!!! Another Cross Domain iFrame. Recently I created a web page that hosted an iFrame.
This post by Michael Mahemoff provides a good introduction to both techniques. I’ve hosted an example of this working. How it works… Cross-Browser Comm Demo via 'Marathon' technique.