Created
November 22, 2012 14:48
-
-
Save palladius/4131532 to your computer and use it in GitHub Desktop.
HelloWorld Riccardo GGadget v1.2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" ?> | |
<Module> | |
<ModulePrefs title="Developer Forum v1.2" | |
title_url="http://groups.google.com/group/Google-Gadgets-API" | |
height="200" | |
category="from_googlers" | |
author="Riccardo Carlesso" | |
author_email="[email protected]" | |
> | |
<Require feature="setprefs" /> | |
</ModulePrefs> | |
<UserPref name="test_string" datatype="string" /> | |
<Content type="html" view="home"><![CDATA[ | |
Test String: __UP_test_string__ | |
]]></Content> | |
<Content type="html" view="configuration"><![CDATA[ | |
<script type="text/javascript"> | |
function registerHandlers() { | |
// Get userprefs | |
var prefs = new gadgets.Prefs(); | |
var pref = document.getElementById('string_pref'); | |
pref.onkeyup = function() { | |
prefs.set('test_string', pref.value); | |
}; | |
} | |
gadgets.util.registerOnLoadHandler(registerHandlers); | |
</script> | |
Test String - <input type="text" id="string_pref" value="__UP_test_string__"/><br/> | |
]]></Content> | |
</Module> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment