ForLoop5
asked on
display more topics from rss feed using google ajax feed
How can I display more topics in my google ajax rss reader located here http://buttonbeats.com/googlerss.html
I looked at the google instructions to do it located here http://www.google.com/uds/solutions/dynamicfeed/reference.html#_numresults
and that said to use the code below to define the number of topics. But im not sure where to insert the code snippet.
<script type="text/javascript">
var options = {
numResults : 8
}
new GFdynamicFeedControl(feed, "feedControl", options);
</script>
and below is the code that displays the rss feed.
I looked at the google instructions to do it located here http://www.google.com/uds/solutions/dynamicfeed/reference.html#_numresults
and that said to use the code below to define the number of topics. But im not sure where to insert the code snippet.
<script type="text/javascript">
var options = {
numResults : 8
}
new GFdynamicFeedControl(feed,
</script>
and below is the code that displays the rss feed.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Google AJAX Feed API - AJAX Slide Show Sample</title>
<script src="http://www.google.com/jsapi/?key=YOUR-KEY"
type="text/javascript"></script>
<script src="http://www.google.com/uds/solutions/dynamicfeed/gfdynamicfeedcontrol.js"
type="text/javascript"></script>
<style type="text/css">
@import url("http://www.google.com/uds/solutions/dynamicfeed/gfdynamicfeedcontrol.css");
#feedControl {
margin-top : 20px;
margin-left: auto;
margin-right: auto;
width : 440px;
font-size: 16px;
color: #9CADD0;
}
</style>
<script type="text/javascript">
function load() {
var feed ="http://rss.people.com/web/people/rss/topheadlines/index.xml";
new GFdynamicFeedControl(feed, "feedControl");
}
google.load("feeds", "1");
google.setOnLoadCallback(load);
</script>
</head>
<body>
<div id="body">
<div id="feedControl">Loading...</div>
</div>
</body>
</html>
Try this - I put some whitespace around the changes. HTH, ~Ray
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Google AJAX Feed API - AJAX Slide Show Sample</title>
<script src="http://www.google.com/jsapi/?key=YOUR KEY HERE"
type="text/javascript"></script>
<script src="http://www.google.com/uds/solutions/dynamicfeed/gfdynamicfeedcontrol.js"
type="text/javascript"></script>
<style type="text/css">
@import url("http://www.google.com/uds/solutions/dynamicfeed/gfdynamicfeedcontrol.css");
#feedControl {
margin-top : 20px;
margin-left: auto;
margin-right: auto;
width : 440px;
font-size: 16px;
color: #9CADD0;
}
</style>
<script type="text/javascript">
function load() {
var feed ="http://rss.people.com/web/people/rss/topheadlines/index.xml";
var options = { numResults : 8 }
new GFdynamicFeedControl(feed, "feedControl", options);
}
google.load("feeds", "1");
google.setOnLoadCallback(load);
</script>
</head>
<body>
<div id="body">
<div id="feedControl">Loading...</div>
</div>
</body>
</html>
On the question of multiple feeds, I expect it can be done, but I do not know how without some experimentation. I think that is really a separate question, but if you want to give me another feed to experiment with, perhaps I can make two appear on the same page.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
worked great. Thank you.
You're welcome, and thanks for the points - it's a great question! ~Ray
ASKER