here is my code that im working on. I turned debug on and i get an
error that says: Error parsing module spec: There should not be CDATA
here. anyone know what im doing wrong.
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="Super-Fish.com | Fish o' the day"
title_url="http://www.super-fish.com"
scrolling="true">
</ModulePrefs>
<UserPref name="show_date" display_name="Show Dates?"
datatype="bool" default_value="false"/>
<UserPref name="num_entries" display_name="Number of Entries:"
default_value="5"/>
<UserPref name="show_summ" display_name="Show Summaries?"
datatype="bool" default_value="false"/>
<Content type="html">
<![CDATA[
<style> #content_div { font-size: 80%; margin: 5px; background-
color: #FFFFBF;} </style>
<div id="content_div"></div>
<script type="text/javascript">
// Get userprefs
var prefs = new gadgets.Prefs();
var showdate = prefs.getBool("show_date");
var entries = prefs.getInt("num_entries");
var summaries = prefs.getBool("show_summ");
function getFeed() {
var params = {};
params[gadgets.io.RequestParameters.CONTENT_TYPE] =
gadgets.io.ContentType.FEED;
params[gadgets.io.RequestParameters.NUM_ENTRIES] = new
Number(entries);
params[gadgets.io.RequestParameters.GET_SUMMARIES] = summaries;
var url = "http://feedproxy.google.com/super-fish/rIYM";
gadgets.io.makeRequest(url, response, params);
};
function response(obj) {
// obj.data contains the feed data
var feed = obj.data;
var html = "";
// Display the feed title and description
html += "<div><b>" + feed.Title + "</b></div>";
html += "<div>" + feed.Description + "</div><br>";
// Access the data for a given entry
if (feed.Entry) {
for (var i = 0; i < feed.Entry.length; i++) {
html += "<div>"
+ "<a target='_blank' href='" + feed.Entry[i].Link + "'>"
+ feed.Entry[i].Title
+ "</a> ";
if (showdate==true)
{
// The feed entry Date field contains the timestamp in
seconds
// since Jan. 1, 1970. To convert it to the milliseconds
needed
// to initialize the JavaScript Date object with the correct
date,
// multiply by 1000.
var milliseconds = (feed.Entry[i].Date) * 1000;
var date = new Date(milliseconds);
html += date.toLocaleDateString();
html += " ";
html += date.toLocaleTimeString();
}
if (summaries==true) {
html += "<br><i>" + feed.Entry[i].Summary + "</i>";
}
html += "</div>";
}
}
document.getElementById('content_div').innerHTML = html;
};
gadgets.util.registerOnLoadHandler(getFeed);
</script>
]]>
</Content>
</Module>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---