Hi Sam,
Try this:
function OnLoad() {
// Create a feed instance that will load feed url.
var feed = new google.feeds.Feed(url);
feed.setNumEntries(1)
// Calling load sends the request off. It requires a callback
function.
feed.load(feedLoaded);
}
On 22/04/09 10:42, "sam123456789" <[email protected]> wrote:
>
> Hi,
>
> This loads all the posts in the feed, whereas I just want to load the
> first post.
>
> Thanks for your help,
>
> Sam
>
> On Apr 21, 9:54 pm, Jeremy Geerdes <[email protected]> wrote:
>> Given your code snippet, I don't know that I understand what you're
>> asking. Could you please clarify what you're wanting to do?
>>
>> Jeremy R. Geerdes
>> Effective website design & development
>> Des Moines, IA
>>
>> For more information or a project
>> quote:http://jgeerdes.home.mchsi.comhttp://jgeerdes.blogspot.comhttp://jgeerd
>> es.wordpress.com
>> [email protected]
>>
>> Unless otherwise noted, any price quotes contained within this
>> communication are given in US dollars.
>>
>> If you're in the Des Moines, IA, area, check out Debra Heights
>> Wesleyan Church!
>>
>> And check out my blog, Adventures in Web Development,
>> athttp://jgeerdes.blogspot.com
>> !
>>
>> On Apr 21, 2009, at 2:43 PM, sam123456789 wrote:
>>
>>
>>
>>
>>
>>> Hi,
>>
>>> I am using this code:
>>
>>> <head>
>>> <script type="text/javascript" src="http://www.google.com/
>>> jsapi"></script>
>>> <script type="text/javascript">
>>> google.load("feeds", "1");
>>> function initialize() {
>>> var feedControl = new google.feeds.FeedControl();
>>> feedControl.addFeed("http://www.example.com/rss.xml", "");
>>> feedControl.draw(document.getElementById("feedControl"));
>>> }
>>> google.setOnLoadCallback(initialize);
>>> </script>
>>> </head>
>>
>>> <body>
>>> <div id="feedControl">Loading...</div>
>>> </body>
>>
>>> How can I make it so it just loads the 1 most recent feed?
>>
>>> And if possible, how can I get it to not show the name of the person
>>> who posted the feed?
>>
>>> Thank you so much,
>>
>>> Sam- Hide quoted text -
>>
>> - Show quoted text -
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google AJAX APIs" 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-AJAX-Search-API?hl=en
-~----------~----~----~----~------~----~------~--~---