开发者

In my google API mash code, How to update existing newsframe instead of inserting newsframe?

Below is the Javascript code used.

 google.load("elements", "1", {packages : ["newsshow"]});  
 function loadNews(newsQuery)
        {
            //Load the news feed according to the topic selected
            var options = 
            {
                "format": "300x250",
                "queryList" : 
                [
                    {
                        "title" : newsQuery,  
                        "q"     : newsQuery
                    }
                ]
            }
            var content = document.getElementById('content');
            var newsShow = new google.elements.NewsShow(content, options);
        }

The newsAddress value is a text box value entered by user. And based on the textbox value, the div element 'content' gets updated with a new element.

My problem is, every-time when I enter a value in text box (newsAddress), a news item in 'content' element is getting inserted one below the other. My requirement is to update the开发者_Python百科 same news element based on the new search criteria.

How can this be done?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜