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]
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/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].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to