Hi,
I tried to use += instead of = but result is the same. the feeds loads 
corectly (three feeds) but when click on feed modal window shows third feed 
title and content (third feed is the oldest by date). Here im providing 
link to my web page, the page is unfinished and i have a lot of work to do. 
And i hope that russian language doesn't makes much difficulty. If You take 
a look to page code then You will see that feeds generates automaticaly and 
there is no code on page, there is just link to javascript in head, and 
<div> with proper id for placing feeds inside.

There is page - http://nfoxinc.ru

понедельник, 24 февраля 2014 г., 4:42:16 UTC+2 пользователь jgeerdes [AJAX 
APIs "Guru"] написал:
>
> You're overwriting the container.innerHTML with every news entry. Use += 
> instead of = .
>
> And if that doesn't fix the problem, please post a link to the page, 
> working or not, so we can see the code in action. It's generally much 
> easier to debug things that way than by reading plain code, particularly 
> when formatting isn't preserved.
>
> jg
>
>
> On Sun, Feb 23, 2014 at 8:41 PM, Rev. Jeremy R. Geerdes <
> [email protected] <javascript:>> wrote:
>
>> You're overwriting the container.innerHTML with every news entry. Use += 
>> instead of = .
>>
>> And if that doesn't fix the problem, please post a link to the page, 
>> working or not, so we can see the code in action. It's generally much 
>> easier to debug things that way than by reading plain code, particularly 
>> when formatting isn't preserved.
>>
>> jg
>>
>>
>> On Sun, Feb 23, 2014 at 4:14 PM, Sergey Ivanov 
>> <[email protected]<javascript:>
>> > wrote:
>>
>>> Hi,
>>>
>>> Im stuck at showing feed content in modal window, the problem is that 
>>> modal window always shows the same content and same title and i have no 
>>> idea how to fix it. Can anyone give me advice or sample how to resolve my 
>>> problem. Below is the code i use.
>>>
>>> google.load("feeds", "1");
>>>
>>> function initialize(){
>>> var feed = new google.feeds.Feed("
>>> http://allods.mail.ru/newsrss.php?line=news";);
>>>  feed.setNumEntries(3);
>>> feed.load(function(result){
>>> if (!result.error) {
>>>  var container = document.getElementById("ao_news");
>>> var feed_html = '';
>>> for (var i = 0; i < result.feed.entries.length; i++) {
>>>  var entry = result.feed.entries[i];
>>>
>>>               var date_val = new Date(entry.publishedDate);
>>>
>>>               moment.lang('ru');
>>>
>>>                         var ao_news_content = '';
>>>                         ao_news_content +=entry.content;
>>> feed_html +='<div id="ao_news_item"><a class="ao_news_title" href="' + 
>>> entry.link + '" target="_blank">' + entry.title + '</a><div 
>>> class="ao_news_snippet">' +entry.contentSnippet + '</div><span 
>>> class="ao_news_time">' + moment(date_val).fromNow() + '</span></div>' ;
>>>  }            
>>> container.innerHTML = feed_html;
>>>                         $('#ao_read_full').html(ao_news_content);
>>>  }
>>>         $(document).ready(function(){
>>>             $('#ao_read_full').dialog({
>>>                 autoOpen:false,
>>>                 width:800,
>>>                 height:600,
>>>                 modal:true,
>>>                 title:entry.title
>>>             });
>>>             
>>>             $('#ao_news #ao_news_item').each(function(){
>>>                 $(this).click(function(){
>>>                 $('#ao_read_full').dialog('open');
>>>
>>>             });
>>>
>>>             });
>>>         
>>>         });
>>> });
>>> }google.setOnLoadCallback(initialize);
>>>
>>> Legend - #ao_read_full - dialog modal window
>>>              #ao_news - container that holds #ao_news_item
>>>              #ao_news_item - that is feed
>>>
>>> -- 
>>> -- 
>>> 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] <javascript:>
>>> To unsubscribe from this group, send email to
>>> [email protected] <javascript:>
>>> To view this message on the web, visit
>>>
>>> https://groups.google.com/d/msgid/google-ajax-search-api/68b60f5a-3a1b-4ba9-b582-595c792fec56%40googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en
>>>  
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Google AJAX APIs" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to [email protected]<javascript:>
>>> .
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>
>>
>> -- 
>> Rev. Jeremy R. Geerdes, Pastor
>> Debra Heights Wesleyan Church
>> 4025 Lower Beaver Rd
>> Des Moines, IA 50310
>>
>> (515) 344-3037
>> [email protected] <javascript:>
>> http://www.debraheightswesleyan.org
>>  
>
>
>
> -- 
> Jeremy R. Geerdes
> Generally Cool Guy
> Des Moines, IA
>
> If you're in the Des Moines, IA, area, check out Debra Heights Wesleyan 
> Church!
> http://www.debraheightswesleyan.org
>  

-- 
-- 
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]
To view this message on the web, visit
https://groups.google.com/d/msgid/google-ajax-search-api/4428b960-33aa-4cb7-840e-9f4dfebdd0cc%40googlegroups.com
For more options, visit this group at
http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Google AJAX APIs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to