Sorry. There was an error in my code. I guess that's what I get for posting without testing. Anyway, if you change the code to the following, you should get better results.
<!-- START PASTED CODE --> <script type="text/javascript" src="http://www.google.com/jsapi"></script> <script type="text/javascript">//<![CDATA[ google.load('search','1'); google.load('elements','1',{packages:['newsshow']}); function init(){ var newsshow = new google.elements.NewsShow(document.getElementById('myNewsShowContainer'),{ queryList : [ {q : 'Astronomy'}, {topic : 't'} ], ned : 'us', rsz : google.search.Search.SMALL_RESULTSET, format : '728x90', linkTarget : google.search.Search.LINK_TARGET_BLANK }); } google.setOnLoadCallback(init); //]]></script> <div id="myNewsShowContainer"></div> <!-- END PASTED CODE --> In case you didn't notice, the difference is that, instead of including q and topic parameters as top-level members of the options object, you have to stash them in the queryList array. I'll mark up the mistake to brain freeze. It's been a long, cold winter in Iowa! (But, in case anyone is in the area, our church is having a luau after worship March 14 to chase the winter away! Check it out at http://tinyurl.com/luaudetails !) Jeremy R. Geerdes Effective website design & development Des Moines, IA For more information or a project quote: http://jgeerdes.home.mchsi.com [email protected] If you're in the Des Moines, IA, area, check out Debra Heights Wesleyan Church! On Mar 2, 2010, at 12:22 AM, Rudy wrote: > Wow, Thanks Jeremy. This works perfectly with one strange exception. > > The only issue is that it is not letting me see any of my categores. > It shows (in this order) Top Stories, Business, Sports, World, and > then Entertainment. Ironically no "Science and Tech" and/or my > selection "Astronomy, NASA". Per the javascript notes page you > mentioned "A topic selection can only be used without a query. If both > a query and topic are specified, the query will be ignored." I > decided to removing one and then tried removing the other, but it > still shows the same categories above. So I even tried removing both, > and it still gave me the same results, so I think the code may not be > reading the preferences. > > > -- > 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. > -- 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.
