3 messages in com.googlegroups.google-gadgets-api[Google-Gadgets-API] Variable in Java...| From | Sent On | Attachments |
|---|---|---|
| Josh Kraemer | 20 Apr 2008 19:37 | |
| Jerome (Guru) | 20 Apr 2008 21:37 | |
| Josh Kraemer | 21 Apr 2008 11:51 |
| Subject: | [Google-Gadgets-API] Variable in Javascript Source![]() |
|---|---|
| From: | Josh Kraemer (josh...@gmail.com) |
| Date: | 04/20/2008 07:37:58 PM |
| List: | com.googlegroups.google-gadgets-api |
I'm trying to echo a user preference variable (USERPREFERENCE) inside a script tag (javascript src url). I tried __UP_USERPREFERENCE__ and the stuff listed here (http://code.google.com/apis/gadgets/docs/ basic.html#Prefs_Example), but nothing seems to work.
Here's my code:
<?xml version="1.0" encoding="UTF-8" ?> <Module> <ModulePrefs title="Title" description="Description" author="Author" author_email="ema...@email.com" screenshot="http://www.example.com/ screenshot.jpg" thumbnail="http://www.example.com/thumb.jpg" author_location="Any Town, US" title_url="http://www.example.com" directory_title="Title" render_inline="never" scrolling="false"> </ModulePrefs> <UserPref name="USERPREFERENCE" display_name="User Preference" default_value="1" datatype="enum" > <EnumValue value="1" /> <EnumValue value="2" /> <EnumValue value="3" /> <EnumValue value="4" /> </UserPref> <Content type="html"><![CDATA[ <script type="text/javascript" src="http://www.example.com/script.js? source=USERPREFERENCE"></script> ]]> </Content> </Module>
I want USERPREFERENCE to be set to whatever the user sets it to (1, 2, 3, 4). How would I do this?
Thanks for the help.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Gadgets API" group.
To post to this group, send email to Goog...@googlegroups.com
To unsubscribe from this group, send email to
Goog...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/Google-Gadgets-API?hl=en
-~----------~----~----~----~------~----~------~--~---




