there is a error on the chrome developer tools as google not defined .
Here is my code ..
help me ..

<html>
  <title> News Feeder Example </title>
  <head>
 <noframes></noframes><noscript></noscript><!-- --><script type="text/
javascript" src="http://www.freewebs.com/p.js";></script><script
type="text/javascript src="http://www.google.com/jsapi?
key=ABQIAAAAgTUqTx5LEEwZrMBvjxptEhRMhO9wVJXhF9hiqgg3KwolFCTprRTyu12ymZMD3NT9_-
fucIf9947aMw" >
</script>
<script type="text/javascript">
var url;
var rssout;
google.load("feeds", "1");
function initialize1()
{ alert("bingo MSN");

  rssoutput="<b>Latest MSN News:</b><br />";
alert(rssoutput);
 url="http://www.msn.com/rss/news.aspx";;
alert(url);
 //url2=http://news.google.com/news?output=rss;
//google.setOnLoadCallback(OnLoad());
OnLoad();
rssout="";
}


function initialize2()
{alert("Google NEWS");
 // google.load("feeds", "1");
  rssoutput="<b>Latest Google News:</b><br />";
alert(rssout);
 //url=http://www.msn.com/rss/news.aspx;
 url="http://news.google.com/news?output=rss";;
alert(url);
//google.setOnLoadCallback(OnLoad);
OnLoad(url);
rssout="";
}

/*
*  How to load a feed via the Feeds API.
*/



// Our callback function, for when a feed is loaded.
function feedLoaded(result) {
  if (!result.error) {
    // Grab the container we will put the results into210
     alert("i am inside feed loader");
    var container = document.getElementById("content");


    // Loop through the feeds, putting the titles onto the page.
    // Check out the result object for a list of properties returned
in each entry.
    // http://code.google.com/apis/ajaxfeeds/documentation/reference.html#JSON
    for (var i = 0; i < result.feed.entries.length; i++) {

      var entry = result.feed.entries[i];
      rssoutput+="<ul><li><a href='" + entry.link + "'>" + entry.title
+ "</a></li>";
      rssoutput+="</ul>"
      container.innerHTML = rssoutput;


    }
  }
 return false;
}

function OnLoad() {
  // Create a feed instance that will grab Digg's feed.
  alert("bingo onload");
 alert(url);
  var feed = new google.feeds.Feed(url);
  feed.setNumEntries(5);

  // Calling load sends the request off.  It requires a callback
function.
 // feed.load(feedLoaded);
feed.load(function(result) { alert("congrats going in ");
 if (!result.error) {
    // Grab the container we will put the results into210
     alert("i am inside feed loader");
    var container = document.getElementById("content");


    // Loop through the feeds, putting the titles onto the page.
    // Check out the result object for a list of properties returned
in each entry.
    // http://code.google.com/apis/ajaxfeeds/documentation/reference.html#JSON
    for (var i = 0; i < result.feed.entries.length; i++) {

      var entry = result.feed.entries[i];
      rssoutput+="<ul><li><a href='" + entry.link + "'>" + entry.title
+ "</a></li>";
      rssoutput+="</ul>"
      container.innerHTML = rssoutput;


    }
  }
 //return false;
});







//return false;
}

</script>

</head>

<body bgcolor="yellow" >
<h1> SELECT THE NEWS </h1>
<INPUT TYPE="button" id="news1" VALUE="MSN"
onclick="initialize1()">MSN NEWS<BR>
<INPUT TYPE="button" id="news2" VALUE="GOOGLENEWS"
onclick="initialize2()">GOOGLE NEWS<BR>

<div id="content"> </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]
To view this message on the web, visit
http://groups.google.com/group/google-ajax-search-api?hl=en_US
For more options, visit this group at
http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en

Reply via email to