2 messages in com.googlegroups.google-gadgets-apiprefs.getBool
FromSent OnAttachments
jhs198728 Jul 2006 18:20 
Justin McConnell07 Aug 2006 11:57 
Subject:prefs.getBool
From:jhs1987 (jhse@gmail.com)
Date:07/28/2006 06:20:05 PM
List:com.googlegroups.google-gadgets-api

How do I check the user pref's bool value? I must have missed something when I read the API document.

Here is the code, and it shows nothing on the screen.

--------------------------------------------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8" ?> <Module> <ModulePrefs title="bool test" directory_title="bool test" />

<UserPref name="opt1" display_name="opt1" datatype="bool" default_value="true"/> <Content type="html"> <![CDATA[

<script type="text/javascript"> var prefs = new _IG_Prefs(__MODULE_ID__);

if(prefs.getBool("opt1") == true) document.write("true"); else document.write("false");

]]> </Content> </Module>