What a handy thing. Did you know that you don’t have to write all the HTML code for a Google Gadget within the XML file? You can specify the content type as URL instead of HTML, and the URL you specify in your XML gadget file is served in an iframe in the gadget. It’s not suitable for everything, like apps that require cookies or a login.
For something like my ”Search This” widget it’s perfect. I’ve built it using Expression Engine to do the work of rotating random entries so there’s no sense in trying to rewrite it in Javascript, or even in using the nice new libraries for PHP and other languages. If the widget took advantage of OpenSocial capabilities, that would be a different story.
The XML for my gadget is dead simple:
Really! That’s the entire thing.
Here’s where you add my “Search This” gadget to iGoogle, or grab the embed code for a blog.