Thanks Matt,
so my code now looks like this:

<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="HTML Sandbox" />
<UserPref name="code" display_name="code" datatype="string"
default_value="code" />
<Content type="html">
<![CDATA[
<script type="text/javascript">
var prefs = new _IG_Prefs(__MODULE_ID__);
prefs.getString("code");
</script>
]]>
</Content>
</Module>

unfortunately, this still isn't doing what i want it to. My gadget is
blank. with the code above, it should contain the default value of
"code". why isn't it?

On Sep 16, 3:53 pm, Matt Foster <[EMAIL PROTECTED]> wrote:
> getString is a method of the _IG_Prefs class, it can be accessed via
> your instance, "prefs".
>
> prefs.getString("code");
>
> Cheers,
>         Matt
>
> On Sep 15, 11:12 pm, "[EMAIL PROTECTED]"
>
> <[EMAIL PROTECTED]> wrote:
> > I'm working on a VERY basic gadget, and I just can't seem to get it to
> > do what I want (I'm a noob, sorry). I just want to have a userpref
> > string textbox whose value appears on the gadget itself. here's the
> > code i have so far:
>
> > <?xml version="1.0" encoding="UTF-8" ?>
> > <Module>
> > <ModulePrefs title="HTML Sandbox" />
> > <UserPref name="code" display_name="code" datatype="string"
> > default_value="code" />
> > <Content type="html">
> > <![CDATA[
> > <script type="text/javascript">
> > var prefs = new _IG_Prefs(__MODULE_ID__);
> > getString("code");
> > </script>
> > ]]>
> > </Content>
> > </Module>
>
> > The problem, as I see it, is that I'm not doing the getString() right.
> > Maybe I need to use something else? ANY help at all would be
> > fantastic. Thanks.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"iGoogle Developer Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Gadgets-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to