I have a query regarding the use of Google Feed. It is assisting me in displaying RSS feeds through JavaScript. First, I will present the code and then I will pose my question.
JavaScript Section:
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script language="javascript">
var sglm=new Array();
sglm[0]= 'ahmet tanakol';
google.load("feeds", "1");
function initialize() {
var feed = new google.feeds.Feed("http://www.ntvmsnbc.com/id/24927681/device/rss/rss.xml");
feed.setNumEntries(6);
feed.load(function(result) {
if (!result.error) {
var container = document.getElementById("feed");
for (var i = 0; i < result.feed.entries.length; i++) {
var entry = result.feed.entries[i];
var div = document.createElement("div");
div.appendChild(document.createTextNode(entry.title));
container.appendChild(div);
}
}
});
}
google.setOnLoadCallback(initialize);
Content Area:
<body onload="startbcscroll();" bgcolor="#ffffcc" text="navy"><center>
<div id="feed"></div>
Currently, I am utilizing the aforementioned Google Feed code along with another JavaScript to exhibit messages via horizontal scrolling. Both functionalities are operational, but my objective is to render the RSS feed within this horizontal scrolling section. Upon running the code, initial display showcases the titles of the RSS feeds followed by the horizontal scrolling feature at the bottom. The scrolling function retrieves values from an array known as "sglm," as delineated in the JavaScript Section. For instance, it must adhere precisely to this format or else the process may not function correctly;
sglm[0] = 'Hello World'
My aim is to integrate the titles from the RSS feeds into this array in the stipulated format. Despite my attempts, I am unable to successfully accomplish this task and hence seek assistance. Furthermore, the RSS feed titles are contained within a division labeled "feed." Your cooperation is greatly appreciated.