javascriptexternalgoogle-gadget

Google Gadgets and external scripts


I'm trying to create my first custom Google Gadget to be used privately in my company's Google Sites intranet. Ideally I'd like to just show a thumbnail that the user can click that will open a modal window with the full video. This requires my including a couple of small JS libraries in my widget.

For my widget I created this XML:

<?xml version="1.0" encoding="UTF-8"?>
<Module>
    <ModulePrefs title="Video Demos" />
    <Content view="url" 
        href="http://www.website.com/_gadgets/video.php">
    </Content>
</Module>

The "video.php" page has simple HTML on it and includes two JS files for the modal window using but doesn't work.

Are you not able to include external scripts like this? If not, what are my options here?


Solution

  • The content tag is wrong. You must set the "type" attribute as "url":

    <?xml version="1.0" encoding="UTF-8"?>
    <Module>
        <ModulePrefs title="Video Demos" />
        <Content type="url" 
            href="http://www.website.com/_gadgets/video.php">
        </Content>
    </Module>
    

    []s