excellent. thanks so much everyone, I really appreciate it. take care.
On Sep 17, 12:10 pm, Justin McConnell <[EMAIL PROTECTED]> wrote:
> On Sep 16, 8:49 pm, "[EMAIL PROTECTED]"
>
> <[EMAIL PROTECTED]> wrote:
> > awesome. Thank you so much, that's exactly what i wanted. One more
> > thing: i tried using it with html in the value, and it's worked with
> > everything except a <script src>. any reason why?
>
> Most browsers won't execute the contents of a script tag when you add
> it to innerHTML. Instead, get the URL of the script you want, create
> a script tag and add it to the head of the page.
>
> var s = document.createElement("script");
> s.type = "text/javascript";
> s.src = "your url here";
> document.getElementsByTagName("head")[0].appendChild(s);
>
>
>
> > On Sep 16, 9:16 pm, "abowman (Guru)" <[EMAIL PROTECTED]> wrote:
>
> > > If you want to display the value, create a div and write to it like
> > > so.
>
> > > <?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[
> > > <div id="myDiv"></div>
>
> > > <script type="text/javascript">
> > > var prefs = new _IG_Prefs(__MODULE_ID__);
> > > _gel("myDiv").innerHTML = prefs.getString("code");
> > > </script>
>
> > > ]]>
> > > </Content>
> > > </Module>
>
> > > On Sep 16, 7:44 pm, "[EMAIL PROTECTED]"
>
> > > <[EMAIL PROTECTED]> wrote:
> > > > 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
-~----------~----~----~----~------~----~------~--~---