My first guess as to the problem would be that it looks like the calls to feedControl.setLinkTarget are made when feedControl is not in scope. Were these two different files?
Thank you, Jeff On Aug 1, 9:20 pm, SingularityUtopia <[email protected]> wrote: > Regarding a webpage I am building, I include a couple of rss feeds and > I want the links to open in a new window but I cannot understand the > following instructions: > > "The control generates default HTML for each entry that it displays. > The HTML consists of the hyper-linked entry title, the author and > published date, and the entry's content snippet. This method allows > the caller to specify the target of the hyper-linked title. Valid > values include:" > > "* google.feeds.LINK_TARGET_BLANK - links will open in a new > window" > > http://code.google.com/apis/ajaxfeeds/documentation/reference.html > > What precisely is the code I need to insert?... (a point to note is > that sometimes the code I enter does absolutely nothing, such as the > number of results, but all I want to do now is ensure the links open > in new windows/tabs, everything is else is fine)... so far I have > tried the following without success regarding links opening in new > windows/tabs: > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> > <html xmlns="http://www.w3.org/1999/xhtml"> > <head> > <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> > <title>Google AJAX Feed API - AJAX Slide Show Sample</title> > <script src="http://www.google.com/jsapi/? > key=ABQIAAAAwOBnUBz2i6ykTeYCuzyWnxRuGz76c_WrgtlF_6eEf08ykxQ- > PhQA7oNH3bVMWq_m8SqkXqN91BpT6A" > type="text/javascript"></script> > <script src="http://www.google.com/uds/solutions/dynamicfeed/ > gfdynamicfeedcontrol.js" > type="text/javascript"> > > <script type="text/javascript"> > var options = { > numResults : 8 > } > new GFdynamicFeedControl(feed, "feedControl", options); > feedControl.setLinkTarget(google.feeds.LINK_TARGET_BLANK); > > google.feeds.LINK_TARGET_BLANK</script> > > <script type="text/javascript"> > > } > new GFdynamicFeedControl(feed, "feedControl", options > > );feedControl.setLinkTarget(google.feeds.LINK_TARGET_BLANK); > > google.feeds.LINK_TARGET_BLANK > </script> > > </script> > > <style type="text/css"> > @import url("http://www.google.com/uds/solutions/dynamicfeed/ > gfdynamicfeedcontrol.css"); > > #feedControl { > margin-top : 20px; > margin-left: 20px; > margin-right: 20px; > width : 950px; > font: 16px "Arial", sans-serif; > > color: #000272; > > background-color: white; > border: solid green 0px; > > feedControl.setLinkTarget(google.feeds.LINK_TARGET_BLANK); > > google.feeds.LINK_TARGET_BLANK > > #feedControl div.gfc-title { > font: bold 20pt "Arial"; > } > > #feedControl div.gfc-resultsHeader { > text-align: center; > border: 10px; > } > > #feedControl div.gf-result { > clear: both; > padding: 20px; > border-top: dotted red 1px; > > #feedControl div.gf-snippet img { > max-width: 950px; > width: auto; > height: auto; > border: 10px; > } > > } > </style> > <script type="text/javascript"> > function load() { > > var options = { > numResults : 16, > displayTime : 10000 > > } > google.load("feeds", "1"); > google.setOnLoadCallback(load); > </script> > </head> > > <body> > <div id="body"> > <div id="feedControl">Loading...</div> > </div> > </body> > </html> > > <html> > <head> > <script type="text/javascript" src="http://www.google.com/jsapi? > key=ABQIAAAAwOBnUBz2i6ykTeYCuzyWnxRuGz76c_WrgtlF_6eEf08ykxQ- > PhQA7oNH3bVMWq_m8SqkXqN91BpT6A"></script> > <script type="text/javascript"> > > google.load("feeds", "1"); > > function initialize() { > var feedControl = new google.feeds.FeedControl(); > feedControl.addFeed("http://www.kurzweilai.net/news/feed", > "Accelerating Intelligence"); > feedControl.addFeed("http://feeds.feedburner.com/ > singularityhub", "Singularity Hub"); > feedControl.draw(document.getElementById("feedControl")); > } > google.setOnLoadCallback(initialize); > > </script> > </head> > > <body> > <div id="feedControl"></div> > </body> > </html> -- 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.
